@roomle/web-sdk 7.0.0-alpha.2 → 7.0.0-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/THIRD-PARTY-NOTICES.txt +2 -2
- package/lib/ConfiguratorKernel.js +2 -2
- package/lib/ConfiguratorKernel.wasm +0 -0
- package/lib/RoomleCore.js +2 -2
- package/lib/RoomleCore.wasm +0 -0
- package/lib/RoomleToolsCore.wasm +0 -0
- package/lib/{api-DOHbOr7K.mjs → api-0LgvKoxe.mjs} +2 -2
- package/lib/{api-DOHbOr7K.mjs.map → api-0LgvKoxe.mjs.map} +1 -1
- package/lib/asset-loader.worker-Bdvb-pt7.mjs.map +1 -1
- package/lib/budgeteer.sw-ByZxiRBr.mjs.map +1 -1
- package/lib/{configuration-operations-DJD9A1xP.mjs → configuration-operations-B7uJDX_4.mjs} +10 -4
- package/lib/configuration-operations-B7uJDX_4.mjs.map +1 -0
- package/lib/{configurator-DCynrn7X.mjs → configurator-CU7jNdgC.mjs} +3 -3
- package/lib/{configurator-DCynrn7X.mjs.map → configurator-CU7jNdgC.mjs.map} +1 -1
- package/lib/configurator-c5g9sbhL.mjs +3 -0
- package/lib/configurator-capabilities-Cr6BAnms.mjs +3 -0
- package/lib/{configurator-capabilities-BfSMwdWh.mjs → configurator-capabilities-o8fQ6Ang.mjs} +2 -2
- package/lib/{configurator-capabilities-BfSMwdWh.mjs.map → configurator-capabilities-o8fQ6Ang.mjs.map} +1 -1
- package/lib/{configurator-mcp-tools-D00ndjOy.mjs → configurator-mcp-tools-D7vZ7ozM.mjs} +3 -3
- package/lib/configurator-mcp-tools-D7vZ7ozM.mjs.map +1 -0
- package/lib/{glb-viewer-BhiCqjpE.mjs → glb-viewer-BByRaJ8F.mjs} +3 -3
- package/lib/{glb-viewer-BhiCqjpE.mjs.map → glb-viewer-BByRaJ8F.mjs.map} +1 -1
- package/lib/glb-viewer-q6BU-GNu.mjs +3 -0
- package/lib/{homag-intelligence-DuFtYgdG.mjs → homag-intelligence-wHSuuAC4.mjs} +6 -3
- package/lib/homag-intelligence-wHSuuAC4.mjs.map +1 -0
- package/lib/kernel-2ku6lFfE.mjs.map +1 -1
- package/lib/{material-viewer-uEDqIbCx.mjs → material-viewer-beYa7Vpa.mjs} +3 -3
- package/lib/{material-viewer-uEDqIbCx.mjs.map → material-viewer-beYa7Vpa.mjs.map} +1 -1
- package/lib/{packages-DOCmEOxI.mjs → packages-BrZdc9Gx.mjs} +5 -5
- package/lib/{packages-DOCmEOxI.mjs.map → packages-BrZdc9Gx.mjs.map} +1 -1
- package/lib/planner-C0ylcrU1.mjs +3 -0
- package/lib/{planner-D8UVNfkJ.mjs → planner-CSOl3bpc.mjs} +3 -3
- package/lib/{planner-D8UVNfkJ.mjs.map → planner-CSOl3bpc.mjs.map} +1 -1
- package/lib/roomle-headless.d.ts +130 -2
- package/lib/roomle-headless.js +8 -8
- package/lib/{roomle-sdk-C0YpFZdj.mjs → roomle-sdk-ByoTm5M6.mjs} +272 -244
- package/lib/roomle-sdk-ByoTm5M6.mjs.map +1 -0
- package/lib/roomle-sdk.d.ts +130 -2
- package/lib/roomle-sdk.js +6 -6
- package/lib/{roomle-webgpu-renderer-DZ9LaZfc.mjs → roomle-webgpu-renderer-D43bHxhT.mjs} +2 -2
- package/lib/{roomle-webgpu-renderer-DZ9LaZfc.mjs.map → roomle-webgpu-renderer-D43bHxhT.mjs.map} +1 -1
- package/lib/{runtime-Bz0u5ckH.mjs → runtime-D5zrHj-e.mjs} +181 -78
- package/lib/runtime-D5zrHj-e.mjs.map +1 -0
- package/lib/{script-loader-jRBMP-ca.mjs → script-loader-DGVS2Wqe.mjs} +2 -2
- package/lib/{script-loader-jRBMP-ca.mjs.map → script-loader-DGVS2Wqe.mjs.map} +1 -1
- package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/package.json +1 -1
- package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/src/embind/configuratorCoreInterface.d.ts +8 -0
- package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/src/embind/configuratorCoreInterface.js.map +1 -1
- package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/ConfiguratorKernel.js +2 -2
- package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/ConfiguratorKernel.wasm +0 -0
- package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/RoomleCore.js +2 -2
- package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/RoomleCore.wasm +0 -0
- package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/RoomleToolsCore.wasm +0 -0
- package/lib/{tools-core-k93qrqfB.mjs → tools-core-eVa8OooA.mjs} +3 -3
- package/lib/{tools-core-k93qrqfB.mjs.map → tools-core-eVa8OooA.mjs.map} +1 -1
- package/package.json +2 -2
- package/sbom.cdx.json +5 -5
- package/lib/configuration-operations-DJD9A1xP.mjs.map +0 -1
- package/lib/configurator-D5Ehj649.mjs +0 -3
- package/lib/configurator-capabilities-DAJuxSTw.mjs +0 -3
- package/lib/configurator-mcp-tools-D00ndjOy.mjs.map +0 -1
- package/lib/glb-viewer-BrggGLte.mjs +0 -3
- package/lib/homag-intelligence-DuFtYgdG.mjs.map +0 -1
- package/lib/planner-B9GbQLSB.mjs +0 -3
- package/lib/roomle-sdk-C0YpFZdj.mjs.map +0 -1
- package/lib/runtime-Bz0u5ckH.mjs.map +0 -1
package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/ConfiguratorKernel.js
CHANGED
|
@@ -38,14 +38,14 @@ var v=c();for(q in h)h[q].write(v,r[q]);null!==k&&k.push(d,v);return v},pa:H,la:
|
|
|
38
38
|
P(v,function(){lb(`Cannot construct ${k} due to unbound types`,[d])});L([a,b,c],d?[d]:[],y=>{y=y[0];if(d){var B=y.ga;var F=B.ua}else F=Sa.prototype;y=Ta(k,function(...Ka){if(Object.getPrototypeOf(this)!==V)throw new N(`Use 'new' to construct ${k}`);if(void 0===A.ta)throw new N(`${k} has no accessible constructor`);var ub=A.ta[Ka.length];if(void 0===ub)throw new N(`Tried to invoke ctor of ${k} with invalid number of parameters (${Ka.length}) - expected (${Object.keys(A.ta).toString()}) parameters instead!`);
|
|
39
39
|
return ub.apply(this,Ka)});var V=Object.create(F,{constructor:{value:y}});y.prototype=V;var A=new Xa(k,y,V,q,B,g,h,n);if(A.oa){var W;(W=A.oa).Da??(W.Da=[]);A.oa.Da.push(A)}B=new R(k,A,!0,!1,!1);W=new R(k+"*",A,!1,!1,!1);F=new R(k+" const*",A,!1,!0,!1);Ua[a]={pointerType:W,Ka:F};gb(v,y);return[B,W,F]})},v:(a,b,c,d,e,g)=>{var f=mb(b,c);e=S(d,e);L([],[a],h=>{h=h[0];var l=`constructor ${h.name}`;void 0===h.ga.ta&&(h.ga.ta=[]);if(void 0!==h.ga.ta[b-1])throw new N(`Cannot register multiple constructors with identical number of parameters (${b-
|
|
40
40
|
1}) for class '${h.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);h.ga.ta[b-1]=()=>{lb(`Cannot construct ${h.name} due to unbound types`,f)};L([],f,n=>{n.splice(1,0,null);h.ga.ta[b-1]=ob(l,n,null,e,g);return[]});return[]})},e:(a,b,c,d,e,g,f,h,l)=>{var n=mb(c,d);b=M(b);b=pb(b);g=S(e,g);L([],[a],k=>{function r(){lb(`Cannot call ${q} due to unbound types`,n)}k=k[0];var q=`${k.name}.${b}`;b.startsWith("@@")&&(b=Symbol[b.substring(2)]);h&&k.ga.Ua.push(b);
|
|
41
|
-
var v=k.ga.ua,y=v[b];void 0===y||void 0===y.ma&&y.className!==k.name&&y.sa===c-2?(r.sa=c-2,r.className=k.name,v[b]=r):(Va(v,b,q),v[b].ma[c-2]=r);L([],n,B=>{B=ob(q,B,k,g,f,l);void 0===v[b].ma?(B.sa=c-2,v[b]=B):v[b].ma[c-2]=B;return[]});return[]})},Q:a=>K(a,tb),
|
|
41
|
+
var v=k.ga.ua,y=v[b];void 0===y||void 0===y.ma&&y.className!==k.name&&y.sa===c-2?(r.sa=c-2,r.className=k.name,v[b]=r):(Va(v,b,q),v[b].ma[c-2]=r);L([],n,B=>{B=ob(q,B,k,g,f,l);void 0===v[b].ma?(B.sa=c-2,v[b]=B):v[b].ma[c-2]=B;return[]});return[]})},Q:a=>K(a,tb),j:(a,b,c,d,e)=>{b=M(b);e=0===e?"object":1===e?"number":"string";switch(e){case "object":function f(){}f.values={};K(a,{name:b,constructor:f,valueType:e,ha:function(h){return this.constructor.values[h]},ka:(h,l)=>l.value,pa:vb(b,c,d),la:null});
|
|
42
42
|
P(b,f);break;case "number":var g={};K(a,{name:b,Ba:g,valueType:e,ha:h=>h,ka:(h,l)=>l,pa:vb(b,c,d),la:null});P(b,g);delete m[b].sa;break;case "string":g={},K(a,{name:b,Ja:{},Ia:{},Ba:g,valueType:e,ha:function(h){return this.Ia[h]},ka:function(h,l){return this.Ja[l]},pa:vb(b,c,d),la:null}),P(b,g),delete m[b].sa}},d:(a,b,c)=>{var d=wb(a,"enum");b=M(b);switch(d.valueType){case "object":a=d.constructor;d=Object.create(d.constructor.prototype,{value:{value:c},constructor:{value:Ta(`${d.name}_${b}`,function(){})}});
|
|
43
43
|
a.values[c]=d;a[b]=d;break;case "number":d.Ba[b]=c;break;case "string":d.Ja[b]=c,d.Ia[c]=b,d.Ba[b]=b}},A:(a,b,c)=>{b=M(b);K(a,{name:b,ha:d=>d,ka:(d,e)=>e,pa:xb(b,c),la:null})},o:(a,b,c,d,e,g,f)=>{var h=mb(b,c);a=M(a);a=pb(a);e=S(d,e);P(a,function(){lb(`Cannot call ${a} due to unbound types`,h)},b-1);L([],h,l=>{l=[l[0],null].concat(l.slice(1));gb(a,ob(a,l,null,e,g,f),b-1);return[]})},m:(a,b,c,d,e)=>{b=M(b);let g=h=>h;if(0===d){var f=32-8*c;g=h=>h<<f>>>f;e=g(e)}K(a,{name:b,ha:g,ka:(h,l)=>l,pa:Na(b,
|
|
44
44
|
c,0!==d),la:null})},i:(a,b,c)=>{function d(g){return new e(pa.buffer,G[g+4>>2],G[g>>2])}var e=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,BigInt64Array,BigUint64Array][b];c=M(c);K(a,{name:c,ha:d,pa:d},{Sa:!0})},x:a=>{K(a,yb)},u:(a,b,c,d,e,g,f,h,l,n,k,r)=>{c=M(c);g=S(e,g);h=S(f,h);n=S(l,n);r=S(k,r);L([a],[b],q=>{q=q[0];return[new R(c,q.ga,!1,!1,!0,q,d,g,h,n,r)]})},R:(a,b)=>{b=M(b);K(a,{name:b,ha(c){var d=(d=c+4)?Ab.decode(C.subarray(d,Bb(C,d,G[c>>2],
|
|
45
45
|
!0))):"";T(c);return d},ka(c,d){d instanceof ArrayBuffer&&(d=new Uint8Array(d));var e="string"==typeof d;if(!(e||ArrayBuffer.isView(d)&&1==d.BYTES_PER_ELEMENT))throw new N("Cannot pass non-string to std::string");var g=e?zb(d):d.length;var f=Xb(4+g+1),h=f+4;G[f>>2]=g;e?Y(d,h,g+1):C.set(d,h);null!==c&&c.push(T,f);return f},pa:H,la(c){T(c)}})},r:(a,b,c)=>{c=M(c);if(2===b){var d=Db;var e=Eb;var g=Fb}else d=Gb,e=Hb,g=Ib;K(a,{name:c,ha:f=>{var h=d(f+4,G[f>>2]*b,!0);T(f);return h},ka:(f,h)=>{if("string"!=
|
|
46
46
|
typeof h)throw new N(`Cannot pass non-string to C++ string type ${c}`);var l=g(h),n=Xb(4+l+b);G[n>>2]=l/b;e(h,n+4,l+b);null!==f&&f.push(T,n);return n},pa:H,la(f){T(f)}})},h:(a,b,c,d,e,g)=>{Ga[a]={name:M(b),Ca:S(c,d),ra:S(e,g),Fa:[]}},c:(a,b,c,d,e,g,f,h,l,n)=>{Ga[a].Fa.push({Ma:M(b),Ra:c,Pa:S(d,e),Qa:g,Xa:f,Wa:S(h,l),Ya:n})},T:(a,b)=>{b=M(b);K(a,{Ga:!0,name:b,ha:()=>{},ka:()=>{}})},F:()=>{Fa=!1;Jb=0},C:(a,b)=>{a=X(a);b=X(b);a.set(b)},b:(a,b,c)=>{var [d,...e]=Mb(a,b);b=d.ka.bind(d);var g=e.map(l=>l.pa.bind(l));
|
|
47
47
|
a--;var f={toValue:X};a=g.map((l,n)=>{var k=`argFromPtr${n}`;f[k]=l;return`${k}(args${n?"+"+8*n:""})`});switch(c){case 0:var h="toValue(handle)";break;case 2:h="new (toValue(handle))";break;case 3:h="";break;case 1:f.getStringOrSymbol=Pb,h="toValue(handle)[getStringOrSymbol(methodName)]"}h+=`(${a})`;d.Ga||(f.toReturnWire=b,f.emval_returnValue=Nb,h=`return emval_returnValue(toReturnWire, destructorsRef, ${h})`);h=`return function (handle, methodName, destructorsRef, args) {\n${h}\n}`;c=(new Function(Object.keys(f),
|
|
48
|
-
h))(...Object.values(f));h=`methodCaller<(${e.map(l=>l.name)}) => ${d.name}>`;return Lb(Ta(h,c))},V:sb,q:a=>{if(!a)return Q(globalThis);a=Pb(a);return Q(globalThis[a])},l:(a,b)=>{a=X(a);b=X(b);return Q(a[b])},z:a=>{9<a&&(U[a+1]+=1)},U:(a,b)=>{a=X(a);b=X(b);return a instanceof b},a:(a,b,c,d,e)=>Kb[a](b,c,d,e),n:a=>{a=X(a);return"number"==typeof a},s:a=>{a=X(a);return"string"==typeof a},g:()=>Q([]),y:a=>{a=X(a);for(var b=Array(a.length),c=0;c<a.length;c++)b[c]=a[c];return Q(b)},
|
|
48
|
+
h))(...Object.values(f));h=`methodCaller<(${e.map(l=>l.name)}) => ${d.name}>`;return Lb(Ta(h,c))},V:sb,q:a=>{if(!a)return Q(globalThis);a=Pb(a);return Q(globalThis[a])},l:(a,b)=>{a=X(a);b=X(b);return Q(a[b])},z:a=>{9<a&&(U[a+1]+=1)},U:(a,b)=>{a=X(a);b=X(b);return a instanceof b},a:(a,b,c,d,e)=>Kb[a](b,c,d,e),n:a=>{a=X(a);return"number"==typeof a},s:a=>{a=X(a);return"string"==typeof a},g:()=>Q([]),y:a=>{a=X(a);for(var b=Array(a.length),c=0;c<a.length;c++)b[c]=a[c];return Q(b)},k:a=>Q(Pb(a)),f:()=>
|
|
49
49
|
Q({}),D:a=>{var b=X(a);Ha(b);sb(a)},p:(a,b,c)=>{a=X(a);b=X(b);c=X(c);a[b]=c},X:(a,b)=>{a=X(a);b=X(b);return a===b},t:a=>{a=X(a);return Q(typeof a)},G:(a,b)=>{Z[a]&&(clearTimeout(Z[a].id),delete Z[a]);if(!b)return 0;var c=setTimeout(()=>{delete Z[a];Sb(()=>Zb(a,performance.now()))},b);Z[a]={id:c,$a:b};return 0},I:(a,b,c,d)=>{var e=(new Date).getFullYear(),g=(new Date(e,0,1)).getTimezoneOffset();e=(new Date(e,6,1)).getTimezoneOffset();G[a>>2]=60*Math.max(g,e);E[b>>2]=Number(g!=e);b=f=>{var h=Math.abs(f);
|
|
50
50
|
return`UTC${0<=f?"-":"+"}${String(Math.floor(h/60)).padStart(2,"0")}${String(h%60).padStart(2,"0")}`};a=b(g);b=b(e);e<g?(Y(a,c,17),Y(b,d,17)):(Y(a,d,17),Y(b,c,17))},J:a=>{var b=C.length;a>>>=0;if(2147483648<a)return!1;for(var c=1;4>=c;c*=2){var d=b*(1+.2/c);d=Math.min(d,a+100663296);a:{d=(Math.min(2147483648,65536*Math.ceil(Math.max(a,d)/65536))-oa.buffer.byteLength+65535)/65536|0;try{oa.grow(d);na();var e=1;break a}catch(g){}e=void 0}if(e)return!0}return!1},L:(a,b)=>{var c=0,d=0,e;for(e of Vb()){var g=
|
|
51
51
|
b+c;G[a+d>>2]=g;c+=Y(e,g,Infinity)+1;d+=4}return 0},M:(a,b)=>{var c=Vb();G[a>>2]=c.length;a=0;for(var d of c)a+=zb(d)+1;G[b>>2]=a;return 0},N:()=>52,P:()=>52,K:function(){return 70},O:(a,b,c,d)=>{for(var e=0,g=0;g<c;g++){var f=G[b>>2],h=G[b+4>>2];b+=8;for(var l=0;l<h;l++){var n=a,k=C[f+l],r=Wb[n];0===k||10===k?(n=1===n?ja:t,k=Bb(r,0),k=Ab.decode(r.buffer?r.subarray(0,k):new Uint8Array(r.slice(0,k))),n(k),r.length=0):r.push(k)}e+=h}G[d>>2]=e;return 0},E:Rb},ac;
|
package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/ConfiguratorKernel.wasm
CHANGED
|
Binary file
|
|
@@ -44,13 +44,13 @@ var q=m.ka.constructor;void 0===q[b]?(l.wa=c-1,q[b]=l):(Wa(q,b,p),q[b].pa[c-1]=l
|
|
|
44
44
|
var t=l.ka.xa,u=t[b];void 0===u||void 0===u.pa&&u.className!==l.name&&u.wa===c-2?(p.wa=c-2,p.className=l.name,t[b]=p):(Wa(t,b,q),t[b].pa[c-2]=p);M([],m,z=>{z=nb(q,z,l,g,f,k);void 0===t[b].pa?(z.wa=c-2,t[b]=z):t[b].pa[c-2]=z;return[]});return[]})},g:(a,b,c,d,e,g,f,h,k,m)=>{b=N(b);e=T(d,e);M([],[a],l=>{l=l[0];var p=`${l.name}.${b}`,q={get(){V(`Cannot access ${p} due to unbound types`,[c,f])},enumerable:!0,configurable:!0};q.set=k?()=>V(`Cannot access ${p} due to unbound types`,[c,f]):()=>{throw new O(p+
|
|
45
45
|
" is a read-only property");};Object.defineProperty(l.ka.xa,b,q);M([],k?[c,f]:[c],t=>{var u=t[0],z={get(){var I=qb(this,l,p+" getter");return u.la(e(g,I))},enumerable:!0};if(k){k=T(h,k);var F=t[1];z.set=function(I){var A=qb(this,l,p+" setter"),K=[];k(m,A,F.oa(K,I));E(K)}}Object.defineProperty(l.ka.xa,b,z);return[]});return[]})},U:a=>L(a,ub),j:(a,b,c,d,e)=>{b=N(b);e=0===e?"object":1===e?"number":"string";switch(e){case "object":function f(){}f.values={};L(a,{name:b,constructor:f,valueType:e,la:function(h){return this.constructor.values[h]},
|
|
46
46
|
oa:(h,k)=>k.value,ta:wb(b,c,d),qa:null});Q(b,f);break;case "number":var g={};L(a,{name:b,Ga:g,valueType:e,la:h=>h,oa:(h,k)=>k,ta:wb(b,c,d),qa:null});Q(b,g);delete n[b].wa;break;case "string":g={},L(a,{name:b,Na:{},Ma:{},Ga:g,valueType:e,la:function(h){return this.Ma[h]},oa:function(h,k){return this.Na[k]},ta:wb(b,c,d),qa:null}),Q(b,g),delete n[b].wa}},b:(a,b,c)=>{var d=xb(a,"enum");b=N(b);switch(d.valueType){case "object":a=d.constructor;d=Object.create(d.constructor.prototype,{value:{value:c},constructor:{value:Ua(`${d.name}_${b}`,
|
|
47
|
-
function(){})}});a.values[c]=d;a[b]=d;break;case "number":d.Ga[b]=c;break;case "string":d.Na[b]=c,d.Ma[c]=b,d.Ga[b]=b}},D:(a,b,c)=>{b=N(b);L(a,{name:b,la:d=>d,oa:(d,e)=>e,ta:yb(b,c),qa:null})},
|
|
47
|
+
function(){})}});a.values[c]=d;a[b]=d;break;case "number":d.Ga[b]=c;break;case "string":d.Na[b]=c,d.Ma[c]=b,d.Ga[b]=b}},D:(a,b,c)=>{b=N(b);L(a,{name:b,la:d=>d,oa:(d,e)=>e,ta:yb(b,c),qa:null})},o:(a,b,c,d,e,g,f)=>{var h=ob(b,c);a=N(a);a=pb(a);e=T(d,e);Q(a,function(){V(`Cannot call ${a} due to unbound types`,h)},b-1);M([],h,k=>{k=[k[0],null].concat(k.slice(1));hb(a,nb(a,k,null,e,g,f),b-1);return[]})},s:(a,b,c,d,e)=>{b=N(b);let g=h=>h;if(0===d){var f=32-8*c;g=h=>h<<f>>>f;e=g(e)}L(a,{name:b,la:g,oa:(h,
|
|
48
48
|
k)=>k,ta:Oa(b,c,0!==d),qa:null})},n:(a,b,c)=>{function d(g){return new e(ra.buffer,D[g+4>>2],D[g>>2])}var e=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,BigInt64Array,BigUint64Array][b];c=N(c);L(a,{name:c,la:d,ta:d},{Wa:!0})},A:a=>{L(a,zb)},l:(a,b,c,d,e,g,f,h,k,m,l,p)=>{c=N(c);g=T(e,g);h=T(f,h);m=T(k,m);p=T(l,p);M([a],[b],q=>{q=q[0];return[new S(c,q.ka,!1,!1,!0,q,d,g,h,m,p)]})},V:(a,b)=>{b=N(b);L(a,{name:b,la(c){var d=(d=c+4)?Bb.decode(y.subarray(d,
|
|
49
49
|
Cb(y,d,D[c>>2],!0))):"";U(c);return d},oa(c,d){d instanceof ArrayBuffer&&(d=new Uint8Array(d));var e="string"==typeof d;if(!(e||ArrayBuffer.isView(d)&&1==d.BYTES_PER_ELEMENT))throw new O("Cannot pass non-string to std::string");var g=e?Ab(d):d.length;var f=Yb(4+g+1),h=f+4;D[f>>2]=g;e?Y(d,h,g+1):y.set(d,h);null!==c&&c.push(U,f);return f},ta:G,qa(c){U(c)}})},B:(a,b,c)=>{c=N(c);if(2===b){var d=Eb;var e=Fb;var g=Gb}else d=Hb,e=Ib,g=Jb;L(a,{name:c,la:f=>{var h=d(f+4,D[f>>2]*b,!0);U(f);return h},oa:(f,
|
|
50
50
|
h)=>{if("string"!=typeof h)throw new O(`Cannot pass non-string to C++ string type ${c}`);var k=g(h),m=Yb(4+k+b);D[m>>2]=k/b;e(h,m+4,k+b);null!==f&&f.push(U,m);return m},ta:G,qa(f){U(f)}})},i:(a,b,c,d,e,g)=>{Ia[a]={name:N(b),Ha:T(c,d),va:T(e,g),Ja:[]}},c:(a,b,c,d,e,g,f,h,k,m)=>{Ia[a].Ja.push({Qa:N(b),Va:c,Ta:T(d,e),Ua:g,ab:f,$a:T(h,k),bb:m})},X:(a,b)=>{b=N(b);L(a,{Ka:!0,name:b,la:()=>{},oa:()=>{}})},G:()=>{Ha=!1;Kb=0},y:(a,b)=>{a=X(a);b=X(b);a.set(b)},f:(a,b,c)=>{var [d,...e]=Nb(a,b);b=d.oa.bind(d);
|
|
51
51
|
var g=e.map(k=>k.ta.bind(k));a--;var f={toValue:X};a=g.map((k,m)=>{var l=`argFromPtr${m}`;f[l]=k;return`${l}(args${m?"+"+8*m:""})`});switch(c){case 0:var h="toValue(handle)";break;case 2:h="new (toValue(handle))";break;case 3:h="";break;case 1:f.getStringOrSymbol=Qb,h="toValue(handle)[getStringOrSymbol(methodName)]"}h+=`(${a})`;d.Ka||(f.toReturnWire=b,f.emval_returnValue=Ob,h=`return emval_returnValue(toReturnWire, destructorsRef, ${h})`);h=`return function (handle, methodName, destructorsRef, args) {\n${h}\n}`;
|
|
52
52
|
c=(new Function(Object.keys(f),h))(...Object.values(f));h=`methodCaller<(${e.map(k=>k.name)}) => ${d.name}>`;return Mb(Ua(h,c))},Z:tb,x:a=>{if(!a)return R(globalThis);a=Qb(a);return R(globalThis[a])},q:(a,b)=>{a=X(a);b=X(b);return R(a[b])},C:a=>{9<a&&(W[a+1]+=1)},Y:(a,b)=>{a=X(a);b=X(b);return a instanceof b},e:(a,b,c,d,e)=>Lb[a](b,c,d,e),t:a=>{a=X(a);return"number"==typeof a},u:a=>{a=X(a);return"string"==typeof a},h:()=>R([]),v:a=>{a=X(a);for(var b=Array(a.length),c=0;c<a.length;c++)b[c]=a[c];return R(b)},
|
|
53
|
-
|
|
53
|
+
p:a=>R(Qb(a)),d:()=>R({}),T:a=>R(a?Bb.decode(y.subarray(a,Cb(y,a))):""),J:a=>{var b=X(a);E(b);tb(a)},w:(a,b,c)=>{a=X(a);b=X(b);c=X(c);a[b]=c},$:(a,b)=>{a=X(a);b=X(b);return a===b},z:a=>{a=X(a);return R(typeof a)},H:(a,b)=>{Z[a]&&(clearTimeout(Z[a].id),delete Z[a]);if(!b)return 0;var c=setTimeout(()=>{delete Z[a];Tb(()=>$b(a,performance.now()))},b);Z[a]={id:c,eb:b};return 0},K:(a,b,c,d)=>{var e=(new Date).getFullYear(),g=(new Date(e,0,1)).getTimezoneOffset();e=(new Date(e,6,1)).getTimezoneOffset();
|
|
54
54
|
D[a>>2]=60*Math.max(g,e);C[b>>2]=Number(g!=e);b=f=>{var h=Math.abs(f);return`UTC${0<=f?"-":"+"}${String(Math.floor(h/60)).padStart(2,"0")}${String(h%60).padStart(2,"0")}`};a=b(g);b=b(e);e<g?(Y(a,c,17),Y(b,d,17)):(Y(a,d,17),Y(b,c,17))},L:a=>{var b=y.length;a>>>=0;if(2147483648<a)return!1;for(var c=1;4>=c;c*=2){var d=b*(1+.2/c);d=Math.min(d,a+100663296);a:{d=(Math.min(2147483648,65536*Math.ceil(Math.max(a,d)/65536))-qa.buffer.byteLength+65535)/65536|0;try{qa.grow(d);pa();var e=1;break a}catch(g){}e=
|
|
55
55
|
void 0}if(e)return!0}return!1},N:(a,b)=>{var c=0,d=0,e;for(e of Wb()){var g=b+c;D[a+d>>2]=g;c+=Y(e,g,Infinity)+1;d+=4}return 0},O:(a,b)=>{var c=Wb();D[a>>2]=c.length;a=0;for(var d of c)a+=Ab(d)+1;D[b>>2]=a;return 0},P:()=>52,R:()=>52,M:function(){return 70},Q:(a,b,c,d)=>{for(var e=0,g=0;g<c;g++){var f=D[b>>2],h=D[b+4>>2];b+=8;for(var k=0;k<h;k++){var m=a,l=y[f+k],p=Xb[m];0===l||10===l?(m=1===m?ja:v,l=Cb(p,0),l=Bb.decode(p.buffer?p.subarray(0,l):new Uint8Array(p.slice(0,l))),m(l),p.length=0):p.push(l)}e+=
|
|
56
56
|
h}D[d>>2]=e;return 0},F:Sb},bc;bc=await (async function(){function a(c){c=bc=c.exports;kb=c.ca;U=c.da;Yb=c.ea;Zb=n._main=c.fa;$b=c.ha;xa=c.ia;qa=n.wasmMemory=c.aa;ib=c.ga;pa();return bc}var b={a:ac};if(n.instantiateWasm)return new Promise(c=>{n.instantiateWasm(b,(d,e)=>{c(a(d,e))})});ya??=n.locateFile?n.locateFile("RoomleCore.wasm",r):r+"RoomleCore.wasm";return a((await Ba(b)).instance)}());
|
|
Binary file
|
package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/RoomleToolsCore.wasm
CHANGED
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
import { M as e, ft as t, j as n, n as r } from "./roomle-sdk-
|
|
3
|
-
import { t as i } from "./script-loader-
|
|
2
|
+
import { M as e, ft as t, j as n, n as r } from "./roomle-sdk-ByoTm5M6.mjs";
|
|
3
|
+
import { t as i } from "./script-loader-DGVS2Wqe.mjs";
|
|
4
4
|
//#region packages/tools-core/src/utils/injectables.ts
|
|
5
5
|
var a = [new t("script-loader", i)], o = class extends e {
|
|
6
6
|
setupGlobals() {}
|
|
@@ -28,4 +28,4 @@ var a = [new t("script-loader", i)], o = class extends e {
|
|
|
28
28
|
//#endregion
|
|
29
29
|
export { o as ToolsCore };
|
|
30
30
|
|
|
31
|
-
//# sourceMappingURL=tools-core-
|
|
31
|
+
//# sourceMappingURL=tools-core-eVa8OooA.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools-core-
|
|
1
|
+
{"version":3,"file":"tools-core-eVa8OooA.mjs","names":[],"sources":["../../packages/tools-core/src/utils/injectables.ts","../../packages/tools-core/src/tools-core.ts"],"sourcesContent":["import ScriptLoader from '../../../common-core/src/script-loader';\nimport { DependencyInjectionAssignment } from '../../../common-core/src/di/container';\n\nexport const INJECTABLES: DependencyInjectionAssignment[] = [\n new DependencyInjectionAssignment('script-loader', ScriptLoader),\n];\n","import './utils/global-definitions';\n\nimport { Main, BASE_CONTEXT } from '../../common-core/src/main';\nimport type Logger from '../../common-core/src/logger';\nimport RoomleDependencyInjection from '../../common-core/src/di/roomle-dependency-injection';\nimport type RoomleToolsCore from './roomle-tools-core';\nimport type ScriptLoader from '../../common-core/src/script-loader';\nimport { INJECTABLES } from './utils/injectables';\n\nexport class ToolsCore extends Main {\n private _tools: RoomleToolsCore | undefined;\n\n protected setupGlobals(): void {\n //globals are initialized in bootFinished()\n }\n\n protected setupDependencies(): void {\n RoomleDependencyInjection.setup(INJECTABLES);\n this.lookup<Logger>('logger', this._context);\n }\n\n protected cleanUpGlobals(): void {\n this._tools = undefined;\n if (window.RoomleToolsCore) {\n delete window.RoomleToolsCore;\n }\n }\n\n protected cleanUpDependencies(): void {\n const scriptLoader = this.lookup<ScriptLoader>('script-loader');\n if (scriptLoader) {\n scriptLoader.cleanUp();\n }\n }\n\n protected async bootFinished(): Promise<void> {\n this._tools = this.lookup<RoomleToolsCore>(\n 'roomle-tools-core',\n this._context,\n );\n\n if (!window.RoomleToolsCore) {\n window.RoomleToolsCore = this._tools;\n }\n }\n\n public getApi(): RoomleToolsCore {\n if (this._tools === undefined) {\n throw new Error('ToolsCore not initialized. Call boot() first.');\n }\n return this._tools;\n }\n\n protected getContextName(): string {\n return BASE_CONTEXT.TOOLS_CORE;\n }\n}\n"],"mappings":";;;;AAGA,IAAa,IAA+C,CAC1D,IAAI,EAA8B,iBAAiB,EAAa,CACjE,ECIY,IAAb,cAA+B,EAAK;CAGlC,eAA+B;CAI/B,oBAAoC;AAElC,EADA,EAA0B,MAAM,EAAY,EAC5C,KAAK,OAAe,UAAU,KAAK,SAAS;;CAG9C,iBAAiC;AAE/B,EADA,KAAK,SAAS,KAAA,GACV,OAAO,mBACT,OAAO,OAAO;;CAIlB,sBAAsC;EACpC,IAAM,IAAe,KAAK,OAAqB,gBAAgB;AAC/D,EAAI,KACF,EAAa,SAAS;;CAI1B,MAAgB,eAA8B;AAM5C,EALA,KAAK,SAAS,KAAK,OACjB,qBACA,KAAK,SACN,EAEI,OAAO,oBACV,OAAO,kBAAkB,KAAK;;CAIlC,SAAiC;AAC/B,MAAI,KAAK,WAAW,KAAA,EAClB,OAAU,MAAM,gDAAgD;AAElE,SAAO,KAAK;;CAGd,iBAAmC;AACjC,SAAO,EAAa"}
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@roomle/web-sdk",
|
|
3
|
-
"version": "7.0.0-alpha.
|
|
3
|
+
"version": "7.0.0-alpha.4",
|
|
4
4
|
"description": "Roomle Web SDK",
|
|
5
5
|
"author": "Roomle Development",
|
|
6
|
-
"main": "./lib/roomle-sdk-
|
|
6
|
+
"main": "./lib/roomle-sdk-ByoTm5M6.mjs",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"release": "node ../scripts/run-semantic-release.mjs"
|
|
9
9
|
},
|
package/sbom.cdx.json
CHANGED
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
"bomFormat": "CycloneDX",
|
|
4
4
|
"specVersion": "1.6",
|
|
5
5
|
"version": 1,
|
|
6
|
-
"serialNumber": "urn:uuid:
|
|
6
|
+
"serialNumber": "urn:uuid:7a25c40d-8a73-5ebf-9f08-aab25ebb97f7",
|
|
7
7
|
"metadata": {
|
|
8
|
-
"timestamp": "2026-11-
|
|
8
|
+
"timestamp": "2026-11-12T11:52:31.000Z",
|
|
9
9
|
"component": {
|
|
10
10
|
"type": "library",
|
|
11
11
|
"name": "@roomle/web-sdk",
|
|
12
|
-
"version": "
|
|
13
|
-
"bom-ref": "@roomle/web-sdk@
|
|
12
|
+
"version": "bef2bd699c2a0af76ae1c05135a4895d108bbd33",
|
|
13
|
+
"bom-ref": "@roomle/web-sdk@bef2bd699c2a0af76ae1c05135a4895d108bbd33"
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
16
|
"components": [
|
|
@@ -712,7 +712,7 @@
|
|
|
712
712
|
],
|
|
713
713
|
"dependencies": [
|
|
714
714
|
{
|
|
715
|
-
"ref": "@roomle/web-sdk@
|
|
715
|
+
"ref": "@roomle/web-sdk@bef2bd699c2a0af76ae1c05135a4895d108bbd33"
|
|
716
716
|
},
|
|
717
717
|
{
|
|
718
718
|
"ref": "Draco@1.5.6"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"configuration-operations-DJD9A1xP.mjs","names":[],"sources":["../../packages/common-core/src/mcp-api/configuration-operations.ts"],"sourcesContent":["import type { z } from 'zod';\nimport {\n configurationOperationSchemas,\n configurationQuerySchemas,\n type ValidatedOperation,\n type ValidatedQuery,\n} from './configuration-operation-schemas';\nimport type ConfiguratorKernelAccess from '../configurator-kernel-access';\nimport type ConfiguratorContext from '../webgl/configurator-context';\nimport type { RapiAccess } from '../rapi-access';\nimport { BASE_CONTEXT } from '../main';\nimport type {\n ConfiguratorKernelClass,\n KernelComponent,\n KernelDockPairQuerySource,\n KernelParameter,\n KernelParameterGroup,\n PossibleChildPreviewElement,\n} from '../../../typings/kernel';\nimport { ANIMATION_PARAMETER_PREFIX } from '../../../configurator-core/src/utils/animation/animation-value-map';\nimport { collectConfiguratorCapabilities } from './configurator-capabilities';\nimport {\n configurationComponentIds,\n fetchComponentLlmData,\n readComponentLlmData,\n withParameterLlmData,\n} from './component-llm-data';\nimport {\n collectProductFamily,\n productContextOf,\n readComponentDefinition,\n} from './component-models';\nimport type {\n CapabilityJsonObject,\n ConfiguratorCapabilityContext,\n} from './configurator-capabilities-types';\nimport type {\n ConfigurationOperationHistoryState,\n ConfigurationOperationDockingChild,\n ConfigurationOperationExecutePayload,\n ConfigurationOperationHost,\n ConfigurationOperationName,\n ConfigurationOperationQueryPayload,\n ConfigurationOperationQueryResult,\n ConfigurationOperationQueryType,\n ConfigurationOperationResult,\n} from './configuration-operations-types';\n\nconst QUERY_TYPES = Object.keys(configurationQuerySchemas);\nconst EXECUTE_TYPES = Object.keys(configurationOperationSchemas);\n\ntype OperationKind = 'query' | 'operation';\ntype OperationKindLabel = 'Query' | 'Operation';\n\nconst detach = <T>(value: T): T => JSON.parse(JSON.stringify(value));\nconst detachParameters = (parameters: KernelParameter[]): KernelParameter[] =>\n parameters.map((parameter) =>\n detach({\n ...parameter,\n ...(parameter.viewType\n ? { viewType: { value: parameter.viewType.value } }\n : {}),\n }),\n );\n\nconst invalidPayload = (\n kind: OperationKind,\n name: string,\n reason: string,\n): Error => new Error(`Invalid payload for ${kind} '${name}': ${reason}`);\n\nconst parsePayload = <Schema extends z.ZodType>(\n schema: Schema,\n kind: OperationKind,\n name: string,\n payload: unknown,\n): z.output<Schema> => {\n const parsed = schema.safeParse(payload ?? {});\n if (!parsed.success) {\n throw invalidPayload(kind, name, parsed.error.issues[0].message);\n }\n return parsed.data;\n};\n\ninterface OperationSession {\n context: ConfiguratorContext;\n access: ConfiguratorKernelAccess;\n rapi: RapiAccess;\n host: ConfigurationOperationHost;\n kernel: ConfiguratorKernelClass;\n captured: ConfiguratorCapabilityContext;\n assertFresh: () => void;\n}\n\nconst parseConfigurationJson = (value: string): CapabilityJsonObject => {\n try {\n const parsed: unknown = JSON.parse(value);\n if (\n parsed !== null &&\n typeof parsed === 'object' &&\n !Array.isArray(parsed)\n ) {\n return parsed as CapabilityJsonObject;\n }\n } catch {\n /* falls through to the actionable error below */\n }\n throw new Error('Missing or invalid configuration JSON');\n};\n\nconst rootComponentIdOf = (configuration: string): string | undefined => {\n const parsed = parseConfigurationJson(configuration);\n return typeof parsed['componentId'] === 'string' && parsed['componentId']\n ? (parsed['componentId'] as string)\n : undefined;\n};\n\nconst preloadAssemblyRootDefinition = async (\n session: OperationSession,\n kind: OperationKind,\n name: string,\n configuration: string,\n): Promise<void> => {\n const rootComponentId = rootComponentIdOf(configuration);\n if (!rootComponentId) {\n return;\n }\n const record = await session.rapi.getComponent(rootComponentId);\n if (!record.configuration) {\n throw invalidPayload(\n kind,\n name,\n `the definition of root component '${rootComponentId}' has no configuration`,\n );\n }\n session.access.loadComponentIntoKernel(record.configuration, rootComponentId);\n};\n\nconst requireActiveComponent = (\n session: OperationSession,\n kind: OperationKindLabel,\n name: string,\n runtimeId: number,\n): KernelComponent => {\n let component: KernelComponent | undefined;\n try {\n component = session.kernel.getComponent(runtimeId);\n } catch {\n component = undefined;\n }\n if (!component) {\n throw new Error(\n `${kind} '${name}': no component with runtime id ${runtimeId} in the active configuration`,\n );\n }\n if (component.objectId !== session.captured.configurationRuntimeId) {\n throw new Error(\n `${kind} '${name}': component with runtime id ${runtimeId} is not part of the active configuration`,\n );\n }\n return component;\n};\n\nconst resolveDockingChildSource = async (\n session: OperationSession,\n kind: OperationKind,\n name: string,\n child: ConfigurationOperationDockingChild,\n): Promise<Exclude<KernelDockPairQuerySource, { runtimeId: number }>> => {\n if ('componentId' in child) {\n const record = await session.rapi.getComponent(child.componentId);\n if (!record.configuration) {\n throw invalidPayload(\n kind,\n name,\n `component '${child.componentId}' has no configuration`,\n );\n }\n return {\n componentId: child.componentId,\n configuration: record.configuration,\n };\n }\n if ('itemId' in child) {\n const item = await session.rapi.getItem(child.itemId);\n if (!item.configuration) {\n throw invalidPayload(\n kind,\n name,\n `item '${child.itemId}' has no configuration`,\n );\n }\n await preloadAssemblyRootDefinition(\n session,\n kind,\n name,\n item.configuration,\n );\n return { configuration: item.configuration };\n }\n await preloadAssemblyRootDefinition(session, kind, name, child.configuration);\n return { configuration: child.configuration };\n};\n\nconst previewElementOf = (\n child: ConfigurationOperationDockingChild,\n configuration: string,\n): PossibleChildPreviewElement => {\n if ('componentId' in child) {\n return {\n id: child.componentId,\n configuration,\n isComponent: true,\n isItem: false,\n };\n }\n return {\n id:\n 'itemId' in child ? child.itemId : rootComponentIdOf(configuration) ?? '',\n configuration,\n isComponent: false,\n isItem: true,\n };\n};\n\nconst runQuery = async (\n session: OperationSession,\n query: ValidatedQuery,\n): Promise<ConfigurationOperationQueryResult> => {\n const { captured, assertFresh } = session;\n switch (query.type) {\n case 'capabilities': {\n const capabilities = await collectConfiguratorCapabilities(\n session.context,\n session.access,\n session.rapi,\n query.include,\n );\n return {\n type: query.type,\n context: capabilities.context,\n capabilities,\n };\n }\n case 'configuration': {\n const configuration = parseConfigurationJson(\n session.access.getSerializedConfiguration(\n captured.configurationRuntimeId,\n ),\n );\n assertFresh();\n return {\n type: query.type,\n context: captured,\n configuration: detach(configuration),\n configurationHash: captured.configurationHash,\n };\n }\n case 'componentParameters': {\n const component = requireActiveComponent(\n session,\n 'Query',\n query.type,\n query.runtimeId,\n );\n const componentId = session.kernel.getComponentId(query.runtimeId);\n const groups = detach(component.parameterGroups);\n const [kernelParameters, llmData] = await Promise.all([\n session.access.getComponentParameters(query.runtimeId),\n readComponentLlmData(session.rapi, componentId),\n ]);\n const parameters = withParameterLlmData(\n detachParameters(kernelParameters),\n [llmData],\n );\n assertFresh();\n return {\n type: query.type,\n context: captured,\n runtimeId: query.runtimeId,\n componentId,\n groups,\n parameters,\n };\n }\n case 'globalParameters': {\n const rootAsGlobal = session.context.rootComponentParametersAsGlobal;\n const globalDefinition = rootAsGlobal\n ? session.kernel.getComponent(captured.rootRuntimeId)\n : session.kernel.getPlanObject(captured.configurationRuntimeId);\n const groups = detach(\n (globalDefinition.parameterGroups ?? []) as KernelParameterGroup[],\n );\n const componentIds = configurationComponentIds(\n parseConfigurationJson(\n session.access.getSerializedConfiguration(\n captured.configurationRuntimeId,\n ),\n ),\n );\n const [kernelParameters, llmData] = await Promise.all([\n session.access.getGlobalParameters(\n captured.configurationRuntimeId,\n rootAsGlobal,\n ),\n Promise.all(\n componentIds.map((id) => readComponentLlmData(session.rapi, id)),\n ),\n ]);\n const parameters = withParameterLlmData(\n detachParameters(kernelParameters),\n llmData,\n );\n assertFresh();\n return {\n type: query.type,\n context: captured,\n scope: rootAsGlobal ? 'rootComponent' : 'planObject',\n groups,\n parameters,\n };\n }\n case 'possibleChildren': {\n const runtimeId = query.runtimeId ?? captured.configurationRuntimeId;\n if (query.runtimeId !== undefined) {\n requireActiveComponent(session, 'Query', query.type, query.runtimeId);\n }\n const children =\n query.runtimeId !== undefined\n ? await session.host.getChildrenOfPlanComponent(\n query.runtimeId,\n true,\n true,\n )\n : await session.host.getChildrenOfPlanObject(true, true);\n if (!children) {\n throw new Error(\n 'Configuration or selection changed while reading capabilities; read again',\n );\n }\n assertFresh();\n return {\n type: query.type,\n context: captured,\n runtimeId,\n tags: detach(children.tags),\n defaultChild: children.defaultChild\n ? detach(children.defaultChild)\n : undefined,\n };\n }\n case 'dockingPositions': {\n const source = await resolveDockingChildSource(\n session,\n 'query',\n query.type,\n query.child,\n );\n const dockPairs = session.access.getDockPairs(\n captured.configurationRuntimeId,\n source,\n query.allowInsertInBetween,\n );\n assertFresh();\n return {\n type: query.type,\n context: captured,\n allowInsertInBetween: query.allowInsertInBetween,\n dockPairs: detach(dockPairs),\n };\n }\n case 'componentDockingPositions': {\n requireActiveComponent(session, 'Query', query.type, query.runtimeId);\n const dockPairs = session.access.getDockPairs(\n captured.configurationRuntimeId,\n { runtimeId: query.runtimeId },\n query.allowInsertInBetween,\n );\n assertFresh();\n return {\n type: query.type,\n context: captured,\n runtimeId: query.runtimeId,\n allowInsertInBetween: query.allowInsertInBetween,\n dockPairs: detach(dockPairs),\n };\n }\n case 'deleteImpact': {\n const deletable = session.access.isComponentDeletable(\n query.runtimeId,\n query.redockChildrenToParent,\n );\n const componentsDeleted =\n session.access.determineComponentsThatWillBeDeleted(\n query.runtimeId,\n query.redockChildrenToParent,\n );\n assertFresh();\n return {\n type: query.type,\n context: captured,\n runtimeId: query.runtimeId,\n redockChildrenToParent: query.redockChildrenToParent,\n deletable,\n componentsDeleted: detach(componentsDeleted),\n };\n }\n case 'componentSkill': {\n const { skills } = await fetchComponentLlmData(\n session.rapi,\n query.componentId,\n );\n const skill = skills.find(({ name }) => name === query.name);\n if (!skill) {\n const available = skills.length\n ? `its skills are ${skills.map(({ name }) => name).join(', ')}`\n : 'it has no skills';\n throw new Error(\n `Query 'componentSkill': component '${query.componentId}' has no skill '${query.name}'; ${available}`,\n );\n }\n assertFresh();\n return {\n type: query.type,\n context: captured,\n componentId: query.componentId,\n ...skill,\n };\n }\n case 'productContext': {\n const configuration = parseConfigurationJson(\n session.access.getSerializedConfiguration(\n captured.configurationRuntimeId,\n ),\n );\n const unresolved: Array<{\n resourceType: 'component' | 'item';\n id: string;\n reason: string;\n }> = [];\n const family = await collectProductFamily(\n session.rapi,\n configuration,\n (resourceType, id, error) =>\n unresolved.push({\n resourceType,\n id,\n reason: error instanceof Error ? error.message : String(error),\n }),\n [],\n );\n assertFresh();\n return {\n type: query.type,\n context: captured,\n product: productContextOf(family, captured.rootComponentId),\n unresolved,\n };\n }\n case 'componentDefinition': {\n let component;\n try {\n component = await readComponentDefinition(\n session.rapi,\n query.componentId,\n );\n } catch (error) {\n throw new Error(\n `Query 'componentDefinition': component '${query.componentId}' could not be read: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n assertFresh();\n return { type: query.type, context: captured, component };\n }\n }\n};\n\nconst runOperation = async (\n session: OperationSession,\n operation: ValidatedOperation,\n) => {\n const { captured, assertFresh } = session;\n const resultHash = (): string =>\n session.access.getCurrentConfigurationHash(\n session.context.configurationRuntimeId,\n );\n switch (operation.type) {\n case 'changeComponentParameter': {\n requireActiveComponent(\n session,\n 'Operation',\n operation.type,\n operation.runtimeId,\n );\n if (operation.key.startsWith(ANIMATION_PARAMETER_PREFIX)) {\n throw new Error(\n `Operation 'changeComponentParameter': parameter keys starting with '${ANIMATION_PARAMETER_PREFIX}' are reserved for the animation system`,\n );\n }\n const parameters = await session.access.getComponentParameters(\n operation.runtimeId,\n );\n const parameter = parameters.find((entry) => entry.key === operation.key);\n if (!parameter) {\n throw new Error(\n `Operation 'changeComponentParameter': the component with runtime id ${operation.runtimeId} has no parameter '${operation.key}'`,\n );\n }\n if (!parameter.enabled) {\n throw new Error(\n `Operation 'changeComponentParameter': the parameter '${operation.key}' of the component with runtime id ${operation.runtimeId} is disabled`,\n );\n }\n assertFresh();\n session.access.setComponentParameter(\n operation.runtimeId,\n operation.key,\n operation.value,\n );\n session.access.updateSelectedComponentDependencies(\n captured.configurationRuntimeId,\n );\n return {\n type: operation.type,\n context: captured,\n configurationHash: resultHash(),\n runtimeId: operation.runtimeId,\n key: operation.key,\n value: operation.value,\n };\n }\n case 'changeGlobalParameter': {\n const rootAsGlobal = session.context.rootComponentParametersAsGlobal;\n const parameters = await session.access.getGlobalParameters(\n captured.configurationRuntimeId,\n rootAsGlobal,\n );\n const parameter = parameters.find((entry) => entry.key === operation.key);\n if (!parameter) {\n throw new Error(\n `Operation 'changeGlobalParameter': the active configuration has no global parameter '${operation.key}'`,\n );\n }\n if (!parameter.enabled) {\n throw new Error(\n `Operation 'changeGlobalParameter': the global parameter '${operation.key}' is disabled`,\n );\n }\n assertFresh();\n if (rootAsGlobal) {\n session.access.setComponentParameter(\n captured.rootRuntimeId,\n operation.key,\n operation.value,\n );\n } else {\n session.access.setPlanObjectParameter(\n captured.configurationRuntimeId,\n operation.key,\n operation.value,\n );\n }\n session.access.updateSelectedComponentDependencies(\n captured.configurationRuntimeId,\n );\n return {\n type: operation.type,\n context: captured,\n configurationHash: resultHash(),\n scope: rootAsGlobal ? 'rootComponent' : 'planObject',\n key: operation.key,\n value: operation.value,\n };\n }\n case 'previewDockings': {\n const source = await resolveDockingChildSource(\n session,\n 'operation',\n operation.type,\n operation.child,\n );\n assertFresh();\n const dockPairs = session.access.getDockPairs(\n captured.configurationRuntimeId,\n source,\n session.access.allowInsertingBetweenWhenDocking,\n );\n session.host\n .getSceneManager()\n .requestDockingsPreview(\n true,\n previewElementOf(operation.child, source.configuration),\n );\n return {\n type: operation.type,\n context: captured,\n configurationHash: resultHash(),\n dockPairCount: dockPairs.length,\n };\n }\n case 'dockComponent': {\n const source = await resolveDockingChildSource(\n session,\n 'operation',\n operation.type,\n operation.child,\n );\n assertFresh();\n const runtimeId = session.access.dockNewComponent(\n captured.configurationRuntimeId,\n source,\n {\n parentId: operation.parentId,\n parentDockId: operation.parentDockId,\n position: operation.position,\n insertInBetween: operation.insertInBetween,\n },\n );\n return {\n type: operation.type,\n context: captured,\n configurationHash: resultHash(),\n runtimeId,\n };\n }\n case 'dragComponent': {\n requireActiveComponent(\n session,\n 'Operation',\n operation.type,\n operation.runtimeId,\n );\n requireActiveComponent(\n session,\n 'Operation',\n operation.type,\n operation.parentId,\n );\n assertFresh();\n session.access.dockComponent(\n operation.parentId,\n operation.parentDockId,\n operation.runtimeId,\n operation.childDockId,\n operation.position,\n );\n return {\n type: operation.type,\n context: captured,\n configurationHash: resultHash(),\n runtimeId: operation.runtimeId,\n };\n }\n case 'deleteComponent': {\n requireActiveComponent(\n session,\n 'Operation',\n operation.type,\n operation.runtimeId,\n );\n if (\n !session.access.isComponentDeletable(\n operation.runtimeId,\n operation.redockChildrenToParent,\n )\n ) {\n throw new Error(\n `Operation 'deleteComponent': the component with runtime id ${operation.runtimeId} is not deletable with redockChildrenToParent ${operation.redockChildrenToParent}`,\n );\n }\n const componentsDeleted =\n session.access.determineComponentsThatWillBeDeleted(\n operation.runtimeId,\n operation.redockChildrenToParent,\n );\n assertFresh();\n session.access.deleteComponent(\n operation.runtimeId,\n operation.redockChildrenToParent,\n );\n return {\n type: operation.type,\n context: captured,\n configurationHash: resultHash(),\n runtimeId: operation.runtimeId,\n redockChildrenToParent: operation.redockChildrenToParent,\n componentsDeleted: detach(componentsDeleted),\n };\n }\n case 'replaceComponent': {\n requireActiveComponent(\n session,\n 'Operation',\n operation.type,\n operation.runtimeId,\n );\n const source = await resolveDockingChildSource(\n session,\n 'operation',\n operation.type,\n operation.child,\n );\n assertFresh();\n const replaced = session.access.replaceComponent(\n captured.configurationRuntimeId,\n operation.runtimeId,\n source,\n );\n if (!replaced) {\n throw new Error(\n `Operation 'replaceComponent': the configurator did not put the child in the place of the component with runtime id ${operation.runtimeId}; the configuration is unchanged. Read the configuration again before the next operation: its runtime ids can have changed`,\n );\n }\n return {\n type: operation.type,\n context: captured,\n configurationHash: resultHash(),\n runtimeId: replaced.runtimeId,\n componentsDeleted: detach(replaced.componentsDeleted),\n };\n }\n case 'swapComponents': {\n const [firstRuntimeId, secondRuntimeId] = operation.runtimeIds;\n for (const runtimeId of [firstRuntimeId, secondRuntimeId]) {\n requireActiveComponent(session, 'Operation', operation.type, runtimeId);\n }\n assertFresh();\n session.access.swapComponents(\n captured.configurationRuntimeId,\n firstRuntimeId,\n secondRuntimeId,\n );\n return {\n type: operation.type,\n context: captured,\n configurationHash: resultHash(),\n runtimeIds: [firstRuntimeId, secondRuntimeId],\n };\n }\n case 'loadConfiguration': {\n await session.host\n .getSceneManager()\n .reloadConfiguration(operation.configuration);\n return {\n type: operation.type,\n context: captured,\n configurationHash: resultHash(),\n };\n }\n case 'undo': {\n await session.host.undo();\n return {\n type: operation.type,\n context: captured,\n configurationHash: resultHash(),\n };\n }\n case 'redo': {\n await session.host.redo();\n return {\n type: operation.type,\n context: captured,\n configurationHash: resultHash(),\n };\n }\n }\n};\n\nconst STALE_QUERY_MESSAGE =\n 'Configuration or selection changed while reading capabilities; read again';\nconst STALE_OPERATION_MESSAGE =\n 'Configuration or selection changed while executing the operation; the operation was not applied';\n\ninterface QueuedConfiguration {\n pending: number;\n configurationRuntimeId: number;\n}\n\nlet operationChain: Promise<unknown> = Promise.resolve();\nconst queuedConfigurations = new WeakMap<\n ConfiguratorContext,\n QueuedConfiguration\n>();\n\nconst enqueue = <T>(\n context: ConfiguratorContext,\n staleMessage: string,\n work: (queued: QueuedConfiguration) => Promise<T>,\n): Promise<T> => {\n const current = queuedConfigurations.get(context);\n const queued = current?.pending\n ? current\n : { pending: 0, configurationRuntimeId: context.configurationRuntimeId };\n queuedConfigurations.set(context, queued);\n queued.pending += 1;\n const run = operationChain.then(() => {\n if (context.configurationRuntimeId !== queued.configurationRuntimeId) {\n throw new Error(staleMessage);\n }\n return work(queued);\n });\n operationChain = run\n .finally(() => {\n queued.pending -= 1;\n })\n .catch(() => undefined);\n return run;\n};\n\nconst captureContext = (\n context: ConfiguratorContext,\n kernel: ConfiguratorKernelClass,\n access: ConfiguratorKernelAccess,\n): ConfiguratorCapabilityContext => {\n if (\n context.baseContext !== BASE_CONTEXT.CONFIGURATOR ||\n !context.configurationRuntimeId\n ) {\n throw new Error(\n 'Load a configuration or enter planner isolation before reading configurator capabilities',\n );\n }\n if (kernel.isExternalPlanObject(context.configurationRuntimeId)) {\n throw new Error(\n 'Use the HI external-object API to read capabilities of an external configuration',\n );\n }\n const rootRuntimeId = kernel.getRootPlanComponentIdFromObjectId(\n context.configurationRuntimeId,\n );\n if (!rootRuntimeId) {\n throw new Error(\n 'No active root component; load a configuration before reading capabilities',\n );\n }\n return {\n configurationRuntimeId: context.configurationRuntimeId,\n rootRuntimeId,\n rootComponentId: kernel.getComponentId(rootRuntimeId),\n selectedRuntimeIds: [...context.selectedRuntimeComponentIds],\n configurationHash: access.getCurrentConfigurationHash(\n context.configurationRuntimeId,\n ),\n };\n};\n\nconst createAssertFresh = (\n context: ConfiguratorContext,\n kernel: ConfiguratorKernelClass,\n access: ConfiguratorKernelAccess,\n captured: ConfiguratorCapabilityContext,\n staleMessage: string,\n): (() => void) => {\n const rootAsGlobal = context.rootComponentParametersAsGlobal;\n const contextRootId = context.rootComponentId;\n return () => {\n try {\n if (\n JSON.stringify(captureContext(context, kernel, access)) ===\n JSON.stringify(captured) &&\n rootAsGlobal === context.rootComponentParametersAsGlobal &&\n contextRootId === context.rootComponentId\n ) {\n return;\n }\n } catch {\n /* A target that disappeared also invalidates the captured read. */\n }\n throw new Error(staleMessage);\n };\n};\n\nexport const queryConfigurationOperation = (\n context: ConfiguratorContext,\n access: ConfiguratorKernelAccess,\n rapi: RapiAccess,\n host: ConfigurationOperationHost,\n type: ConfigurationOperationQueryType,\n payload?: ConfigurationOperationQueryPayload,\n): Promise<ConfigurationOperationQueryResult> =>\n enqueue(context, STALE_QUERY_MESSAGE, async () => {\n if (!QUERY_TYPES.includes(type)) {\n throw new Error(\n `Unknown configuration operation query type '${String(type)}'; expected one of: ${QUERY_TYPES.join(', ')}`,\n );\n }\n const query = {\n ...parsePayload(configurationQuerySchemas[type], 'query', type, payload),\n type,\n } as ValidatedQuery;\n const kernel = access.kernelInstance;\n const captured = captureContext(context, kernel, access);\n const assertFresh = createAssertFresh(\n context,\n kernel,\n access,\n captured,\n STALE_QUERY_MESSAGE,\n );\n return runQuery(\n {\n context,\n access,\n rapi,\n host,\n kernel,\n captured,\n assertFresh,\n },\n query,\n );\n });\n\nexport const executeConfigurationOperation = (\n context: ConfiguratorContext,\n access: ConfiguratorKernelAccess,\n rapi: RapiAccess,\n host: ConfigurationOperationHost,\n readHistory: () => ConfigurationOperationHistoryState,\n name: ConfigurationOperationName,\n payload?: ConfigurationOperationExecutePayload,\n): Promise<ConfigurationOperationResult> =>\n enqueue(context, STALE_OPERATION_MESSAGE, async (queued) => {\n if (!EXECUTE_TYPES.includes(name)) {\n throw new Error(\n `Unknown configuration operation '${String(name)}'; expected one of: ${EXECUTE_TYPES.join(', ')}`,\n );\n }\n const operation = {\n ...parsePayload(\n configurationOperationSchemas[name],\n 'operation',\n name,\n payload,\n ),\n type: name,\n } as ValidatedOperation;\n const kernel = access.kernelInstance;\n const captured = captureContext(context, kernel, access);\n const assertFresh = createAssertFresh(\n context,\n kernel,\n access,\n captured,\n STALE_OPERATION_MESSAGE,\n );\n const before = readHistory();\n const result = await runOperation(\n {\n context,\n access,\n rapi,\n host,\n kernel,\n captured,\n assertFresh,\n },\n operation,\n );\n queued.configurationRuntimeId = context.configurationRuntimeId;\n const after = readHistory();\n return {\n ...result,\n history: {\n changed:\n before.configurationHash !== after.configurationHash &&\n after.configurationHash === result.configurationHash,\n canUndo: after.canUndo,\n canRedo: after.canRedo,\n },\n } as ConfigurationOperationResult;\n });\n"],"mappings":";;;;;AAgDA,IAAM,IAAc,OAAO,KAAK,EAA0B,EACpD,IAAgB,OAAO,KAAK,EAA8B,EAK1D,KAAa,MAAgB,KAAK,MAAM,KAAK,UAAU,EAAM,CAAC,EAC9D,KAAoB,MACxB,EAAW,KAAK,MACd,EAAO;CACL,GAAG;CACH,GAAI,EAAU,WACV,EAAE,UAAU,EAAE,OAAO,EAAU,SAAS,OAAO,EAAE,GACjD,EAAE;CACP,CAAC,CACH,EAEG,KACJ,GACA,GACA,MACU,gBAAI,MAAM,uBAAuB,EAAK,IAAI,EAAK,KAAK,IAAS,EAEnE,KACJ,GACA,GACA,GACA,MACqB;CACrB,IAAM,IAAS,EAAO,UAAU,KAAW,EAAE,CAAC;AAC9C,KAAI,CAAC,EAAO,QACV,OAAM,EAAe,GAAM,GAAM,EAAO,MAAM,OAAO,GAAG,QAAQ;AAElE,QAAO,EAAO;GAaV,KAA0B,MAAwC;AACtE,KAAI;EACF,IA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Aa;AAC3B,QAAO;EACL,GAAG;EACH,SAAS;GACP,SACE,EAAO,sBAAsB,EAAM,qBACnC,EAAM,sBAAsB,EAAO;GACrC,SAAS,EAAM;GACf,SAAS,EAAM;GAChB;EACF;EACD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"configurator-mcp-tools-D00ndjOy.mjs","names":[],"sources":["../../packages/configurator-core/src/configurator-tools/configurator-mcp-tools.ts"],"sourcesContent":["import type { z } from 'zod';\nimport type { RoomleConfigurator } from '../roomle-configurator';\nimport { mcpTool } from '../../../common-core/src/agent-tools/mcp-tool';\nimport type { AgentTools } from '../../../common-core/src/agent-tools/mcp-tool-types';\nimport type {\n ConfigurationOperationExecutePayload,\n ConfigurationOperationHistoryState,\n ConfigurationOperationName,\n ConfigurationOperationQueryType,\n} from '../../../common-core/src/mcp-api/configuration-operations-types';\nimport {\n configurationOperationSchemas,\n configurationQuerySchemas,\n} from '../../../common-core/src/mcp-api/configuration-operation-schemas';\nconst UNDO_DESCRIPTION =\n \"Reverts the last change of the configuration, as the configurator's undo button does; call it again to revert \" +\n 'the change before. Returns undone - whether a change was reverted -, canUndo and canRedo - whether a further undo ' +\n 'or redo is possible -, and a hint when nothing was reverted.';\n\nconst REDO_DESCRIPTION =\n \"Brings back the change the last undo reverted, as the configurator's redo button does. A new change of the \" +\n 'configuration ends redo. Returns redone - whether a change was brought back -, canUndo and canRedo, and a hint ' +\n 'when nothing was brought back.';\n\nconst SHOW_DOCKING_PREVIEWS_DESCRIPTION =\n 'Shows the docking previews of a possible child in the configurator, as a click on the add-on does, so that the ' +\n 'user can choose the position by clicking a preview; the child as a component id, an item id or an assembly ' +\n 'configuration. Showing the previews changes no configuration and no history; the docking the user clicks lands ' +\n 'one step in the undo history. Returns dockPairCount - the number of docking positions - and a hint when there is none.';\n\nconst textResult = (result: unknown) => ({\n content: [{ type: 'text' as const, text: JSON.stringify(result) }],\n});\n\n// The configuration's runtime id is the plan object's, which no agent tool\n// takes; the agent's results leave it out, the operation API keeps it.\nconst withoutConfigurationRuntimeId = (result: object): object => {\n if (\n !('context' in result) ||\n !result.context ||\n typeof result.context !== 'object'\n ) {\n return result;\n }\n const { configurationRuntimeId: _configurationRuntimeId, ...context } =\n result.context as Record<string, unknown>;\n return { ...result, context };\n};\n\nconst READ_ANNOTATIONS = {\n readOnlyHint: true,\n destructiveHint: false,\n idempotentHint: true,\n openWorldHint: true,\n} as const;\n\nconst WRITE_ANNOTATIONS = {\n readOnlyHint: false,\n destructiveHint: false,\n idempotentHint: false,\n openWorldHint: true,\n} as const;\n\nconst DESTRUCTIVE_WRITE_ANNOTATIONS = {\n ...WRITE_ANNOTATIONS,\n destructiveHint: true,\n} as const;\n\nconst PREVIEW_ANNOTATIONS = {\n ...WRITE_ANNOTATIONS,\n idempotentHint: true,\n} as const;\n\n// One read tool per queryConfigurationOperation query, except capabilities,\n// which keeps its own registration and its established result contract.\nconst CONFIGURATION_QUERY_TOOLS: Array<{\n name: string;\n type: ConfigurationOperationQueryType;\n description: string;\n}> = [\n {\n name: 'get-configuration',\n type: 'configuration',\n description:\n 'Reads the current configuration as parsed JSON plus its hash for change detection. Returns the ' +\n 'configuration, the hash and the read context. This read changes no configuration, selection or history.',\n },\n {\n name: 'get-component-parameters',\n type: 'componentParameters',\n description:\n 'Reads the current parameters and parameter groups of the component with the given runtime id. Runtime ids ' +\n 'identify instances; catalog ids identify definitions. Returns the parameters, the groups, the component id ' +\n 'and the read context. This read changes no configuration, selection or history.',\n },\n {\n name: 'get-global-parameters',\n type: 'globalParameters',\n description:\n 'Reads the current global parameters of the configuration; the result reports whether the plan object or ' +\n 'the root component scope was read. This read changes no configuration, selection or history.',\n },\n {\n name: 'get-possible-children',\n type: 'possibleChildren',\n description:\n 'Reads the possible children that can be docked: every possible child of the configuration, or of the ' +\n 'component with the given runtime id. The result carries the child tags and the default child. This read ' +\n 'changes no configuration, selection or history.',\n },\n {\n name: 'get-docking-positions',\n type: 'dockingPositions',\n description:\n 'Reads the docking positions a possible child can be docked at, given as a component id, an item id or an ' +\n 'assembly configuration; allowInsertInBetween also returns insert positions. The result lists the dock pairs ' +\n '- parent and child dock ids, position, rotation, insertInBetween, displaced components - computed without ' +\n 'drawing previews. This read changes no configuration, selection, history or the scene.',\n },\n {\n name: 'get-component-docking-positions',\n type: 'componentDockingPositions',\n description:\n 'Reads the docking positions the component with the given runtime id can be moved to; ' +\n 'allowInsertInBetween also returns insert positions. The result lists the dock pairs computed without ' +\n 'drawing previews. This read changes no configuration, selection, history or the scene.',\n },\n {\n name: 'get-delete-impact',\n type: 'deleteImpact',\n description:\n 'Reads the impact of deleting the component with the given runtime id: whether it can be deleted and which ' +\n 'component runtime ids are deleted with it; redockChildrenToParent chooses between re-docking the children ' +\n 'to the parent and deleting them with the component. This read changes no configuration, selection or ' +\n 'history.',\n },\n {\n name: 'get-component-skill',\n type: 'componentSkill',\n description:\n 'Reads the text of a skill of a component, by the component id and the skill name that the system prompt ' +\n 'or get-configurator-capabilities names. Follow the skill for the change it covers. Returns the component ' +\n 'id, the name, the description and the skill text. This read changes no configuration, selection or history.',\n },\n {\n name: 'get-product-context',\n type: 'productContext',\n description:\n 'Reads the static product context: every component that can be used in the configuration, read recursively ' +\n 'from the product - its id, label, LLM description, skill names, and the components and items that can be ' +\n 'docked to it -, in walk order from the root component. The system prompt already holds it; read it again ' +\n 'only after another product was loaded. Returns the root component id, the components and the reads that ' +\n 'failed. This read changes no configuration, selection or history.',\n },\n {\n name: 'get-component-definition',\n type: 'componentDefinition',\n description:\n 'Reads the definition of a component by its component id, also of a component that is not in the ' +\n 'configuration yet: its label, LLM description, skills, possible children, parameter groups and parameters ' +\n 'with key, label, type, unit, group, default value, global flag, valid values or range and llmData. The ' +\n 'definition is static; get-component-parameters reads the current values of a component in the ' +\n 'configuration by its runtime id. This read changes no configuration, selection or history.',\n },\n];\n\n// One write tool per executeConfigurationOperation operation, except undo and\n// redo, which keep their own registrations and their established result\n// contract. Writes report the resulting native history state.\nconst CONFIGURATION_OPERATION_TOOLS: Array<{\n name: string;\n operation: ConfigurationOperationName;\n description: string;\n annotations: typeof WRITE_ANNOTATIONS | typeof DESTRUCTIVE_WRITE_ANNOTATIONS;\n}> = [\n {\n name: 'change-component-parameter',\n operation: 'changeComponentParameter',\n description:\n 'Changes the parameter key of the component with the given runtime id to the given value; the key ' +\n 'must be one of the parameters get-component-parameters returned for the component. The change ' +\n 'lands one step in the undo history. Returns confirmed - whether the configurator reported the ' +\n 'change -, canUndo and canRedo, and a hint when the change was not confirmed.',\n annotations: WRITE_ANNOTATIONS,\n },\n {\n name: 'change-global-parameter',\n operation: 'changeGlobalParameter',\n description:\n 'Changes the global parameter key to the given value; the key must be one of the parameters ' +\n 'get-global-parameters returned. The change lands one step in the undo history. Returns confirmed ' +\n '- whether the configurator reported the change -, canUndo and canRedo, and a hint when the ' +\n 'change was not confirmed.',\n annotations: WRITE_ANNOTATIONS,\n },\n {\n name: 'dock-component',\n operation: 'dockComponent',\n description:\n 'Docks a possible child at a dock pair of the configuration: the child as a component id, an item ' +\n 'id or an assembly configuration, the parent runtime id and dock id, and optionally the position ' +\n 'and whether to insert between. A dock pair a get-docking-positions read returned can be used ' +\n 'unchanged. The docked component lands one step in the undo history. Returns the new component ' +\n 'runtime id, confirmed, canUndo and canRedo, and a hint when the change was not confirmed.',\n annotations: WRITE_ANNOTATIONS,\n },\n {\n name: 'drag-component',\n operation: 'dragComponent',\n description:\n 'Moves the component with the given runtime id to a dock pair: the parent runtime id and the ' +\n 'parent and child dock ids, and optionally the position and whether to insert between, as a ' +\n 'get-component-docking-positions read returned. The move lands one step in the undo history. ' +\n 'Returns confirmed, canUndo and canRedo, and a hint when the change was not confirmed.',\n annotations: WRITE_ANNOTATIONS,\n },\n {\n name: 'delete-component',\n operation: 'deleteComponent',\n description:\n 'Deletes the component with the given runtime id; redockChildrenToParent chooses between ' +\n 're-docking the children to the parent and deleting them with the component - read the impact ' +\n 'with get-delete-impact first. The deletion lands one step in the undo history. Returns the ' +\n 'deleted component runtime ids, confirmed, canUndo and canRedo, and a hint when the change was ' +\n 'not confirmed.',\n annotations: DESTRUCTIVE_WRITE_ANNOTATIONS,\n },\n {\n name: 'replace-component',\n operation: 'replaceComponent',\n description:\n 'Replaces the component with the given runtime id by a possible child at its place: the child as a ' +\n 'component id, an item id or an assembly configuration. The children of the replaced component re-dock ' +\n 'onto the new component where it offers a docking; the others are deleted. The replacement lands one ' +\n 'step in the undo history. Returns the new component runtime id, the deleted runtime ids, confirmed, ' +\n 'canUndo and canRedo, and a hint when the change was not confirmed.',\n annotations: DESTRUCTIVE_WRITE_ANNOTATIONS,\n },\n {\n name: 'swap-components',\n operation: 'swapComponents',\n description:\n 'Lets the two components with the given runtime ids change places, neighbours or not. What is docked ' +\n 'on a component moves with it, and the row keeps its order. The swap lands one step in the undo ' +\n 'history. Returns confirmed, canUndo and canRedo, and a hint when the change was not confirmed.',\n annotations: WRITE_ANNOTATIONS,\n },\n {\n name: 'load-configuration',\n operation: 'loadConfiguration',\n description:\n 'Loads an assembly configuration as the new configuration of the configurator; the configuration ' +\n 'must be JSON with a root componentId, as a get-configuration read returned it. This replaces ' +\n 'the active configuration and records the replacement in undo history. Returns confirmed, canUndo and ' +\n 'canRedo, and a hint when the change was not confirmed.',\n annotations: DESTRUCTIVE_WRITE_ANNOTATIONS,\n },\n];\n\nconst HISTORY_COMMIT_TIMEOUT_MS = 30_000;\nconst HISTORY_COMMIT_INTERVAL_MS = 100;\n\n// The kernel holds the update of a change back until its geometry is ready,\n// so a change that loads assets reaches the history after its operation.\nconst waitForHistoryCommit = async (\n readHistory: () => ConfigurationOperationHistoryState,\n configurationHash: string,\n): Promise<ConfigurationOperationHistoryState | undefined> => {\n // Measured on the clock: a throttled tab stretches each interval.\n const deadline = Date.now() + HISTORY_COMMIT_TIMEOUT_MS;\n while (Date.now() < deadline) {\n await new Promise((resolve) =>\n setTimeout(resolve, HISTORY_COMMIT_INTERVAL_MS),\n );\n const state = readHistory();\n if (state.configurationHash === configurationHash) {\n return state;\n }\n }\n return undefined;\n};\n\n/** The agent tools of one native configurator. */\nexport const createConfiguratorMcpTools = (\n api: Pick<\n RoomleConfigurator,\n 'queryConfigurationOperation' | 'executeConfigurationOperation'\n >,\n readHistory: () => ConfigurationOperationHistoryState,\n): AgentTools => {\n const tools: AgentTools = {};\n const write = async (\n name: ConfigurationOperationName,\n args?: ConfigurationOperationExecutePayload,\n ) => {\n const { history, ...result } = await api.executeConfigurationOperation(\n name,\n args,\n );\n if (name === 'undo' || name === 'redo') {\n const { changed, canUndo, canRedo } = history;\n return textResult({\n [name === 'undo' ? 'undone' : 'redone']: changed,\n canUndo,\n canRedo,\n ...(!changed && {\n hint:\n 'Nothing to ' +\n name +\n ': no configuration history step was applied.',\n }),\n });\n }\n const committed =\n !history.changed &&\n result.configurationHash !== result.context.configurationHash\n ? await waitForHistoryCommit(readHistory, result.configurationHash)\n : undefined;\n const changed = history.changed || committed !== undefined;\n const { canUndo, canRedo } = committed ?? history;\n return textResult({\n ...withoutConfigurationRuntimeId(result),\n confirmed: changed,\n canUndo,\n canRedo,\n ...(!changed && {\n hint: 'No configuration history change was recorded. Inspect the configuration before trying again.',\n }),\n });\n };\n const register = <Schema extends z.ZodType>(\n name: string,\n description: string,\n schema: Schema,\n handler: (args: z.output<Schema>) => Promise<ReturnType<typeof textResult>>,\n annotations?:\n | typeof READ_ANNOTATIONS\n | typeof WRITE_ANNOTATIONS\n | typeof DESTRUCTIVE_WRITE_ANNOTATIONS\n | typeof PREVIEW_ANNOTATIONS,\n ) => {\n tools[name] = {\n ...mcpTool(name, description, schema, async (args) => {\n console.log('[configurator-mcp] tool', name);\n return handler(args);\n }),\n ...(annotations && { annotations }),\n };\n };\n register('undo', UNDO_DESCRIPTION, configurationOperationSchemas.undo, () =>\n write('undo'),\n );\n register('redo', REDO_DESCRIPTION, configurationOperationSchemas.redo, () =>\n write('redo'),\n );\n for (const {\n name,\n operation,\n description,\n annotations,\n } of CONFIGURATION_OPERATION_TOOLS) {\n register(\n name,\n description,\n operation === 'dockComponent'\n ? configurationOperationSchemas.dockComponent.omit({\n childDockId: true,\n })\n : configurationOperationSchemas[operation],\n (args) => write(operation, args),\n annotations,\n );\n }\n register(\n 'show-docking-previews',\n SHOW_DOCKING_PREVIEWS_DESCRIPTION,\n configurationOperationSchemas.previewDockings,\n async (args) => {\n const { dockPairCount } = (await api.executeConfigurationOperation(\n 'previewDockings',\n args,\n )) as { dockPairCount: number };\n return textResult({\n dockPairCount,\n ...(dockPairCount === 0 && {\n hint: 'The possible child has no docking position in the current configuration; the configurator shows the user its no-docking notice.',\n }),\n });\n },\n PREVIEW_ANNOTATIONS,\n );\n register(\n 'get-configurator-capabilities',\n 'Reads native configuration capabilities: the definitions of the product family as agent models (components, items, declared parameters), current kernel choices, materials and docking metadata. Optional include selects sections. complete: false and unresolved describe missing information; declared alternatives may be inactive.',\n configurationQuerySchemas.capabilities,\n async (args) => {\n const result = await api.queryConfigurationOperation(\n 'capabilities',\n args,\n );\n return textResult(\n withoutConfigurationRuntimeId(\n (result as { capabilities: object }).capabilities,\n ),\n );\n },\n READ_ANNOTATIONS,\n );\n for (const { name, type, description } of CONFIGURATION_QUERY_TOOLS) {\n register(\n name,\n description,\n configurationQuerySchemas[type],\n async (args) => {\n const result = await api.queryConfigurationOperation(type, args);\n if (\n type === 'possibleChildren' &&\n (args as { runtimeId?: number }).runtimeId === undefined\n ) {\n const { runtimeId: _runtimeId, ...ofConfiguration } = result as {\n runtimeId?: number;\n };\n return textResult(withoutConfigurationRuntimeId(ofConfiguration));\n }\n return textResult(withoutConfigurationRuntimeId(result));\n },\n READ_ANNOTATIONS,\n );\n }\n return tools;\n};\n"],"mappings":";;;;AAcA,IAAM,IACJ,gSAII,IACJ,4PAII,IACJ,mcAKI,KAAc,OAAqB,EACvC,SAAS,CAAC;CAAE,MAAM;CAAiB,MAAM,KAAK,UAAU,EAAO;CAAE,CAAC,EACnE,GAIK,KAAiC,MAA2B;AAChE,KACE,EAAE,aAAa,MACf,CAAC,EAAO,WACR,OAAO,EAAO,WAAY,SAE1B,QAAO;CAET,IAAM,EAAE,wBAAwB,GAAyB,GAAG,MAC1D,EAAO;AACT,QAAO;EAAE,GAAG;EAAQ;EAAS;GAGzB,IAAmB;CACvB,cAAc;CACd,iBAAiB;CACjB,gBAAgB;CAChB,eAAe;CAChB,EAEK,IAAoB;CACxB,cAAc;CACd,iBAAiB;CACjB,gBAAgB;CAChB,eAAe;CAChB,EAEK,IAAgC;CACpC,GAAG;CACH,iBAAiB;CAClB,EAEK,IAAsB;CAC1B,GAAG;CACH,gBAAgB;CACjB,EAIK,IAID;CACH;EACE,MAAM;EACN,MAAM;EACN,aACE;EAEH;CACD;EACE,MAAM;EACN,MAAM;EACN,aACE;EAGH;CACD;EACE,MAAM;EACN,MAAM;EACN,aACE;EAEH;CACD;EACE,MAAM;EACN,MAAM;EACN,aACE;EAGH;CACD;EACE,MAAM;EACN,MAAM;EACN,aACE;EAIH;CACD;EACE,MAAM;EACN,MAAM;EACN,aACE;EAGH;CACD;EACE,MAAM;EACN,MAAM;EACN,aACE;EAIH;CACD;EACE,MAAM;EACN,MAAM;EACN,aACE;EAGH;CACD;EACE,MAAM;EACN,MAAM;EACN,aACE;EAKH;CACD;EACE,MAAM;EACN,MAAM;EACN,aACE;EAKH;CACF,EAKK,IAKD;CACH;EACE,MAAM;EACN,WAAW;EACX,aACE;EAIF,aAAa;EACd;CACD;EACE,MAAM;EACN,WAAW;EACX,aACE;EAIF,aAAa;EACd;CACD;EACE,MAAM;EACN,WAAW;EACX,aACE;EAKF,aAAa;EACd;CACD;EACE,MAAM;EACN,WAAW;EACX,aACE;EAIF,aAAa;EACd;CACD;EACE,MAAM;EACN,WAAW;EACX,aACE;EAKF,aAAa;EACd;CACD;EACE,MAAM;EACN,WAAW;EACX,aACE;EAKF,aAAa;EACd;CACD;EACE,MAAM;EACN,WAAW;EACX,aACE;EAGF,aAAa;EACd;CACD;EACE,MAAM;EACN,WAAW;EACX,a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;AACD,MAAK,IAAM,EACT,SACA,cACA,gBACA,oBACG,EACH,GACE,GACA,GACA,MAAc,kBACV,EAA8B,cAAc,KAAK,EAC/C,aAAa,IACd,CAAC,GACF,EAA8B,KACjC,MAAS,EAAM,GAAW,EAAK,EAChC,EACD;AAoBH,CAlBA,EACE,yBACA,GACA,EAA8B,iBAC9B,OAAO,MAAS;EACd,IAAM,EAAE,qBAAmB,MAAM,EAAI,8BACnC,mBACA,EACD;AACD,SAAO,EAAW;GAChB;GACA,GAAI,MAAkB,KAAK,EACzB,MAAM,mIACP;GACF,CAAC;IAEJ,EACD,EACD,EACE,iCACA,2UACA,EAA0B,cAC1B,OAAO,MAKE,EACL,GALa,MAAM,EAAI,4BACvB,gBACA,EACD,EAGwC,aACtC,CACF,EAEH,EACD;AACD,MAAK,IAAM,EAAE,SAAM,SAAM,oBAAiB,EACxC,GACE,GACA,GACA,EAA0B,IAC1B,OAAO,MAAS;EACd,IAAM,IAAS,MAAM,EAAI,4BAA4B,GAAM,EAAK;AAChE,MACE,MAAS,sBACR,EAAgC,cAAc,KAAA,GAC/C;GACA,IAAM,EAAE,WAAW,GAAY,GAAG,MAAoB;AAGtD,UAAO,EAAW,EAA8B,EAAgB,CAAC;;AAEnE,SAAO,EAAW,EAA8B,EAAO,CAAC;IAE1D,EACD;AAEH,QAAO"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"homag-intelligence-DuFtYgdG.mjs","names":["native"],"sources":["../../../../node_modules/uuid/dist/esm-browser/stringify.js","../../../../node_modules/uuid/dist/esm-browser/rng.js","../../../../node_modules/uuid/dist/esm-browser/native.js","../../../../node_modules/uuid/dist/esm-browser/v4.js","../../packages/homag-intelligence/src/callbacks.ts","../../packages/homag-intelligence/src/orders.ts","../../packages/homag-intelligence/src/debug-logging.ts","../../packages/homag-intelligence/src/homag-intelligence.ts"],"sourcesContent":["import validate from './validate.js';\nconst byteToHex = [];\nfor (let i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).slice(1));\n}\nexport function unsafeStringify(arr, offset = 0) {\n return (byteToHex[arr[offset + 0]] +\n byteToHex[arr[offset + 1]] +\n byteToHex[arr[offset + 2]] +\n byteToHex[arr[offset + 3]] +\n '-' +\n byteToHex[arr[offset + 4]] +\n byteToHex[arr[offset + 5]] +\n '-' +\n byteToHex[arr[offset + 6]] +\n byteToHex[arr[offset + 7]] +\n '-' +\n byteToHex[arr[offset + 8]] +\n byteToHex[arr[offset + 9]] +\n '-' +\n byteToHex[arr[offset + 10]] +\n byteToHex[arr[offset + 11]] +\n byteToHex[arr[offset + 12]] +\n byteToHex[arr[offset + 13]] +\n byteToHex[arr[offset + 14]] +\n byteToHex[arr[offset + 15]]).toLowerCase();\n}\nfunction stringify(arr, offset = 0) {\n const uuid = unsafeStringify(arr, offset);\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n return uuid;\n}\nexport default stringify;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RyaW5naWZ5LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3N0cmluZ2lmeS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLFFBQVEsTUFBTSxlQUFlLENBQUM7QUFNckMsTUFBTSxTQUFTLEdBQWEsRUFBRSxDQUFDO0FBRS9CLEtBQUssSUFBSSxDQUFDLEdBQUcsQ0FBQyxFQUFFLENBQUMsR0FBRyxHQUFHLEVBQUUsRUFBRSxDQUFDLEVBQUUsQ0FBQztJQUM3QixTQUFTLENBQUMsSUFBSSxDQUFDLENBQUMsQ0FBQyxHQUFHLEtBQUssQ0FBQyxDQUFDLFFBQVEsQ0FBQyxFQUFFLENBQUMsQ0FBQyxLQUFLLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQztBQUNwRCxDQUFDO0FBRUQsTUFBTSxVQUFVLGVBQWUsQ0FBQyxHQUFl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0FBQztRQUMzQixTQUFTLENBQUMsR0FBRyxDQUFDLE1BQU0sR0FBRyxFQUFFLENBQUMsQ0FBQztRQUMzQixTQUFTLENBQUMsR0FBRyxDQUFDLE1BQU0sR0FBRyxFQUFFLENBQUMsQ0FBQyxDQUM1QixDQUFDLFdBQVcsRUFBRSxDQUFDO0FBQ2xCLENBQUM7QUFFRCxTQUFTLFNBQVMsQ0FBQyxHQUFlLEVBQUUsTUFBTSxHQUFHLENBQUM7SUFDNUMsTUFBTSxJQUFJLEdBQUcsZUFBZSxDQUFDLEdBQUcsRUFBRSxNQUFNLENBQUMsQ0FBQztJQU8xQyxJQUFJLENBQUMsUUFBUSxDQUFDLElBQUksQ0FBQyxFQUFFLENBQUM7UUFDcEIsTUFBTSxTQUFTLENBQUMsNkJBQTZCLENBQUMsQ0FBQztJQUNqRCxDQUFDO0lBRUQsT0FBTyxJQUFJLENBQUM7QUFDZCxDQUFDO0FBRUQsZUFBZSxTQUFTLENBQUMifQ==","let getRandomValues;\nconst rnds8 = new Uint8Array(16);\nexport default function rng() {\n if (!getRandomValues) {\n if (typeof crypto === 'undefined' || !crypto.getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n getRandomValues = crypto.getRandomValues.bind(crypto);\n }\n return getRandomValues(rnds8);\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicm5nLWJyb3dzZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvcm5nLWJyb3dzZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBSUEsSUFBSSxlQUEwRCxDQUFDO0FBRS9ELE1BQU0sS0FBSyxHQUFHLElBQUksVUFBVSxDQUFDLEVBQUUsQ0FBQyxDQUFDO0FBRWpDLE1BQU0sQ0FBQyxPQUFPLFVBQVUsR0FBRztJQUV6QixJQUFJLENBQUMsZUFBZSxFQUFFLENBQUM7UUFDckIsSUFBSSxPQUFPLE1BQU0sS0FBSyxXQUFXLElBQUksQ0FBQyxNQUFNLENBQUMsZUFBZSxFQUFFLENBQUM7WUFDN0QsTUFBTSxJQUFJLEtBQUssQ0FDYiwwR0FBMEcsQ0FDM0csQ0FBQztRQUNKLENBQUM7UUFFRCxlQUFlLEdBQUcsTUFBTSxDQUFDLGVBQWUsQ0FBQyxJQUFJLENBQUMsTUFBTSxDQUFDLENBQUM7SUFDeEQsQ0FBQztJQUVELE9BQU8sZUFBZSxDQUFDLEtBQUssQ0FBQyxDQUFDO0FBQ2hDLENBQUMifQ==","const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);\nexport default { randomUUID };\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmF0aXZlLWJyb3dzZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvbmF0aXZlLWJyb3dzZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsTUFBTSxVQUFVLEdBQ2QsT0FBTyxNQUFNLEtBQUssV0FBVyxJQUFJLE1BQU0sQ0FBQyxVQUFVLElBQUksTUFBTSxDQUFDLFVBQVUsQ0FBQyxJQUFJLENBQUMsTUFBTSxDQUFDLENBQUM7QUFFdkYsZUFBZSxFQUFFLFVBQVUsRUFBRSxDQUFDIn0=","import native from './native.js';\nimport rng from './rng.js';\nimport { unsafeStringify } from './stringify.js';\nfunction v4(options, buf, offset) {\n if (native.randomUUID && !buf && !options) {\n return native.randomUUID();\n }\n options = options || {};\n const rnds = options.random || (options.rng || rng)();\n rnds[6] = (rnds[6] & 0x0f) | 0x40;\n rnds[8] = (rnds[8] & 0x3f) | 0x80;\n if (buf) {\n offset = offset || 0;\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n return buf;\n }\n return unsafeStringify(rnds);\n}\nexport default v4;\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sQ0FBQyxFQUFFLENBQUM7WUFDNUIsR0FBRyxDQUFDLE1BQU0sR0FBRyxDQUFDLENBQUMsR0FBRyxJQUFJLENBQUMsQ0FBQyxDQUFDLENBQUM7UUFDNUIsQ0FBQztRQUVELE9BQU8sR0FBRyxDQUFDO0lBQ2IsQ0FBQztJQUVELE9BQU8sZUFBZSxDQUFDLElBQUksQ0FBQyxDQUFDO0FBQy9CLENBQUM7QUFFRCxlQUFlLEVBQUUsQ0FBQyJ9","import type { GlueLogic } from './glue-logic';\nimport { type RoomlePlanner } from '../../planner-core/src/roomle-planner';\nimport type { BASE_CONTEXT } from '../../common-core/src/main';\nimport type { SELECTION_MODE } from '../../configurator-core/src/utils/selection-handler';\nimport type { CallbackObjectType } from '../../planner-core/src/utils/planner-scene-utils';\nimport type { SelectionPayload } from '../../planner-core/src/roomle-planner-ui-callback';\nimport { type PlanElementViewModel } from '../../common-core/src/view-model/plan-element-view-model';\nimport type { CancelSelectionReasons } from '../../typings/planner';\n\nexport const initCallbacks = (\n roomlePlanner: RoomlePlanner,\n gluLogic: GlueLogic,\n) => {\n roomlePlanner.callbacks.onCompletelyLoaded = () => {\n gluLogic.groupsCompletelyLoaded();\n };\n\n roomlePlanner.callbacks.onExternalObjectModuleSelected = (\n groupId: string,\n rootModuleId: string | null,\n subModuleId: string | null,\n ) => {\n gluLogic.hiObjectSelection.groupOrModuleSelected(\n groupId,\n rootModuleId,\n subModuleId,\n );\n };\n\n roomlePlanner.callbacks.onContextChanged = (context: BASE_CONTEXT): void => {\n gluLogic.hiObjectSelection.contextChanged(context);\n };\n\n roomlePlanner.callbacks.onSelectionChange = (\n selectionMode: SELECTION_MODE,\n objectType: CallbackObjectType,\n payload: SelectionPayload,\n payloadPromise: Promise<SelectionPayload>,\n planElementViewModel: PlanElementViewModel,\n ): void => {\n gluLogic.hiObjectSelection.selectionChanged(\n selectionMode,\n objectType,\n payload,\n payloadPromise,\n planElementViewModel,\n );\n };\n\n roomlePlanner.callbacks.onSelectionCancel = (\n reason: CancelSelectionReasons,\n ): void => {\n gluLogic.hiObjectSelection.selectionCancel(reason);\n };\n};\n","import { type RoomlePlanner } from '../../planner-core/src/roomle-planner';\nimport type { GlueLogic } from './glue-logic';\nimport type { KernelPlanObject } from '../../typings/kernel';\nimport type { ExternalObjectSnapshotSaveResult } from './external-object-api';\nimport type {\n HiOrder,\n HiOrderData,\n HiOrderHeader,\n} from '#/common/src/hi/hi-types';\n\nconst getISO8601Date = (date = new Date()) => {\n // Get the ISO string (in UTC)\n let isoString = date.toISOString();\n\n // Remove the 'Z' at the end which indicates UTC\n isoString = isoString.slice(0, -1);\n\n // Find the position of milliseconds\n const msPosition = isoString.lastIndexOf('.');\n\n // Get the base timestamp with 3 digits of milliseconds and extend with zeros\n let baseTimestamp = isoString;\n\n if (msPosition !== -1) {\n // Add 4 zeros to extend from 3 to 7 digits of precision\n baseTimestamp = isoString.substring(0, msPosition + 4) + '0000';\n }\n\n // Get timezone offset in minutes and convert to hours and minutes\n const offsetMinutes = date.getTimezoneOffset();\n const offsetHours = Math.abs(Math.floor(offsetMinutes / 60));\n const offsetMins = Math.abs(offsetMinutes % 60);\n\n // Format the offset as +HH:MM or -HH:MM\n const offsetSign = offsetMinutes <= 0 ? '+' : '-';\n const offsetString = `${offsetSign}${String(offsetHours).padStart(\n 2,\n '0',\n )}:${String(offsetMins).padStart(2, '0')}`;\n\n return baseTimestamp + offsetString;\n};\n\nexport const createEmptyOrder = (): HiOrder => {\n const formatLocalDateTime = (date: Date = new Date()): string => {\n const pad = (n: number) => String(n).padStart(2, '0');\n\n const yyyy = date.getFullYear();\n const MM = pad(date.getMonth() + 1); // months are 0-based\n const dd = pad(date.getDate());\n\n const HH = pad(date.getHours());\n const mm = pad(date.getMinutes());\n const ss = pad(date.getSeconds());\n\n return `${yyyy}-${MM}-${dd} ${HH}:${mm}:${ss}`;\n };\n\n return {\n id: (window as any).uuidv4\n ? (window as any).uuidv4()\n : '00000000-0000-0000-0000-000000000000',\n state: 'New',\n orderNumber: '736362',\n orderName: 'SC-Order ' + formatLocalDateTime(),\n orderDescription: 'Lorem ipsum dolor sit amet...',\n project: 'Single family house Müller John',\n personInCharge: 'Joe',\n orderDate: getISO8601Date(),\n deliveryDatePlanned: getISO8601Date(\n new Date(Date.now() + 14 * 24 * 60 * 60 * 1000),\n ),\n addresses: [\n {\n type: 'Delivery, Billing',\n street: 'Musterstraße',\n houseNumber: '1',\n postalCode: '12345',\n city: 'Musterstadt',\n country: 'Deutschland',\n },\n ],\n customerName: 'Müller & Co.',\n customerNumber: '462642',\n createdAt: getISO8601Date(),\n changedAt: getISO8601Date(),\n changedBy: 'Selfish',\n items: [] as any[],\n };\n};\n\nconst _addMerchantPositions = async (\n roomlePlanner: RoomlePlanner,\n groupData: any,\n) => {\n const planOverview = await roomlePlanner.getPlanOverview();\n const count: Record<string, number> = {}; // key is id and value is count\n const itemIds = (\n planOverview.objects as unknown as KernelPlanObject[]\n ).reduce((acc: string[], item: any) => {\n if (item.catalogItemId) {\n if (!count[item.catalogItemId]) {\n count[item.catalogItemId] = 0;\n acc.push(item.catalogItemId);\n }\n count[item.catalogItemId]++;\n }\n return acc;\n }, []);\n const items =\n Array.isArray(itemIds) && itemIds.length > 0\n ? await roomlePlanner.getRapiAccess().getItems(itemIds)\n : [];\n const merchantItems = items.filter((item: any) => {\n if (item.manufacturerSKU !== undefined) {\n item.count = count[item.id];\n return true;\n }\n return false;\n });\n if (Array.isArray(merchantItems) && merchantItems.length > 0) {\n if (!groupData.items) {\n groupData.items = [];\n }\n let posNo = groupData.items.reduce((acc: number, item: any) => {\n if (item.items?.length) {\n return acc + item.items.length;\n }\n return acc;\n }, 0);\n merchantItems.forEach((item) => {\n const pos = {} as any;\n pos.type = 'Position';\n pos.name = (++posNo).toString();\n pos.articleNumber = item.manufacturerSKU;\n pos.articleName = item.label;\n pos.catalog = item.catalog;\n pos.quantity = item.count;\n pos.height = item.height;\n pos.width = item.width;\n pos.depth = item.depth;\n pos.procurementType = 'PTO';\n pos.additionalData = [];\n if (item.perspectiveImage) {\n pos.additionalData.push({\n category: 'ArticleImage',\n downloadUri: item.perspectiveImage,\n type: 'Image',\n });\n }\n groupData.items.push(pos);\n });\n }\n};\n\nexport default class Orders {\n private _roomlePlanner: RoomlePlanner;\n private _glueLogic: GlueLogic;\n\n constructor(roomlePlanner: RoomlePlanner, glueLogic: GlueLogic) {\n this._roomlePlanner = roomlePlanner;\n this._glueLogic = glueLogic;\n }\n\n public async fetchPrice(planId?: string, orderHeader?: HiOrderHeader) {\n let orderData = await this._glueLogic.getGroupDataForOrder({\n roomlePlannerId: planId,\n });\n if (!orderData?.items?.length) {\n return null;\n }\n return await this._fetchOrderDataWithPrice(orderData, orderHeader);\n }\n\n public async placeOrder(\n withPrice: boolean = true,\n orderHeader?: HiOrderHeader,\n ) {\n const planData = await this._roomlePlanner.saveExternalObjectSnapshot();\n if (!planData) {\n console.error('Could not save plan snapshot before placing order');\n return;\n }\n if (!planData.orderData) {\n console.error('No order data found in plan snapshot');\n return;\n }\n\n const priceData =\n withPrice && planData.orderData.items?.length > 0\n ? await this._fetchOrderDataWithPrice(planData.orderData, orderHeader)\n : null;\n let order;\n if (priceData) {\n order = priceData.orderData;\n } else {\n order = this._createOrder(orderHeader);\n order.items.push(planData.orderData as never);\n await _addMerchantPositions(this._roomlePlanner, planData.orderData);\n }\n\n // The first item in the order is the one created from the HI objects in the plan\n if (order.items?.length > 0) {\n this._addAdditionalDataToOrder(order.items[0], planData);\n }\n\n await this._glueLogic.hiCallbacks?.onPlaceOrder?.(order);\n }\n\n private _addAdditionalDataToOrder(\n orderData: HiOrderData,\n planData: ExternalObjectSnapshotSaveResult,\n ) {\n if (!Array.isArray(orderData.additionalData)) {\n orderData.additionalData = [];\n }\n if (planData.perspectiveImageLink) {\n orderData.additionalData.push({\n type: 'Image',\n category: 'OverviewImage',\n downloadUri: planData.perspectiveImageLink,\n });\n }\n if (planData.topImageLink) {\n orderData.additionalData.push({\n type: 'Image',\n category: 'AboveImage',\n downloadUri: planData.topImageLink,\n });\n }\n if (planData.objectGlbLink) {\n orderData.additionalData.push({\n type: 'ThreeD',\n category: 'ThreeDModel',\n downloadUri: planData.objectGlbLink,\n });\n }\n }\n\n private async _fetchOrderDataWithPrice(\n orderData: HiOrderData,\n orderHeader?: HiOrderHeader,\n ): Promise<any> {\n let order = this._createOrder(orderHeader);\n order.items.push(orderData as never);\n return this._glueLogic.hiCallbacks?.onFetchPrice?.(order) ?? null;\n }\n\n private _createOrder(orderHeader?: HiOrderHeader): HiOrder {\n return orderHeader\n ? {\n ...orderHeader,\n items: [],\n }\n : createEmptyOrder();\n }\n}\n","import type { HiCallbacks, HiOrderData } from '#/common/src/hi/hi-types';\nimport type {\n GlueLogic,\n GetGroupDataForOrderOptions,\n LibraryData,\n RoomDesignerRequests,\n ValidContainerModules,\n} from './glue-logic';\nimport type { ExternalObjectGroup } from './external-object-api-callbacks';\nimport type { ExternalModuleInformation } from '../../typings/kernel';\nimport type {\n CheckDropDownResult,\n PosArticle,\n PosGroup,\n PosSaveData,\n} from './model/oc-scripts-domain.model';\nimport type { HiObjectSelectionApi } from './hi-object-selection';\nimport type { HiAgentPrompts } from './hi-agent-prompts';\nimport type {\n HiGroupOperationResult,\n HiToolCommandResult,\n} from './hi-plan-context';\nimport type {\n ExternalObjectGroupLayout,\n ExternalObjectSnapshotSaveResult,\n ExternalPlanObstacles,\n ExternalRoomInformation,\n HiLibraryContext,\n HiLibraryContextOptions,\n HiLibraryContextSection,\n HiPlanContext,\n HiPlanContextOptions,\n HiPlanContextSection,\n LoadExternalObjectOptions,\n PlanRoomGeometryMode,\n} from './external-object-api';\n\nexport class GlueLayerRequestDebugLogging implements GlueLogic {\n private _glueLogic: GlueLogic;\n private _hiCallbacks: HiCallbacks;\n\n constructor(glueLogic: GlueLogic, hiCallbacks: HiCallbacks) {\n this._glueLogic = glueLogic;\n this._hiCallbacks = hiCallbacks;\n }\n\n public get hiCallbacks(): HiCallbacks | null {\n return this._hiCallbacks;\n }\n\n public get hiObjectSelection(): HiObjectSelectionApi {\n return this._glueLogic.hiObjectSelection;\n }\n\n private _logRequest(\n message: string,\n ...args: Array<string | null | undefined>\n ) {\n let messageAndArgs = message;\n if (args) {\n args.forEach((item) => {\n messageAndArgs += ' ' + item;\n });\n }\n this._hiCallbacks.onLogMessage?.('HI REQUEST', messageAndArgs);\n }\n\n public isLibraryLoaded(libraryId: string): boolean {\n return this._glueLogic.isLibraryLoaded(libraryId);\n }\n\n public getLibraryData(libraryId: string): LibraryData | null {\n return this._glueLogic.getLibraryData(libraryId);\n }\n\n public addLibrary(libraryData: LibraryData): Promise<void> {\n this._logRequest('addLibrary', libraryData.libraryId);\n return this._glueLogic.addLibrary(libraryData);\n }\n\n public setPosDataForLoading(posData: PosSaveData | null): Promise<void> {\n this._logRequest('setPosDataForLoading', posData ? 'set' : 'null');\n return this._glueLogic.setPosDataForLoading(posData);\n }\n\n public loadPosData(articleCatalogJson: any, libraryId: string): void {\n this._logRequest('loadPosData', libraryId);\n this._glueLogic.loadPosData(articleCatalogJson, libraryId);\n }\n\n public async mergeGroups(\n targetGroup: ExternalObjectGroup,\n idsOfGroupsMerged: string | string[],\n idOfTargetRootModule: string,\n mergedWithDragging: boolean,\n ): Promise<void> {\n this._logRequest(\n 'mergeGroups',\n targetGroup.groupId,\n JSON.stringify(idsOfGroupsMerged),\n idOfTargetRootModule,\n );\n return this._glueLogic.mergeGroups(\n targetGroup,\n idsOfGroupsMerged,\n idOfTargetRootModule,\n mergedWithDragging,\n );\n }\n\n public deleteRootModule(\n remainingGroup: ExternalObjectGroup,\n rootModuleIdToDelete: string,\n splitOffGroups: ExternalObjectGroup[],\n ): Promise<void> {\n this._logRequest(\n 'deleteRootModule',\n JSON.stringify(remainingGroup),\n rootModuleIdToDelete,\n JSON.stringify(splitOffGroups),\n );\n return this._glueLogic.deleteRootModule(\n remainingGroup,\n rootModuleIdToDelete,\n splitOffGroups,\n );\n }\n\n public splitRootModuleFromGroup(\n splitGroup: ExternalObjectGroup,\n newGroupedRootModules: ExternalObjectGroup[],\n ): Promise<void> {\n this._logRequest(\n 'splitRootModuleFromGroup',\n JSON.stringify(splitGroup),\n JSON.stringify(newGroupedRootModules),\n );\n return this._glueLogic.splitRootModuleFromGroup(\n splitGroup,\n newGroupedRootModules,\n );\n }\n\n public async duplicateGroup(\n duplicatedGroup: ExternalObjectGroup,\n ): Promise<void> {\n this._logRequest('duplicateGroup', duplicatedGroup.groupId);\n return this._glueLogic.duplicateGroup(duplicatedGroup);\n }\n\n public adjustGroup(groupId: string): Promise<void> {\n this._logRequest('adjustGroup', groupId);\n return this._glueLogic.adjustGroup(groupId);\n }\n\n public modifyAttribute(\n groupId: string,\n moduleIdObjects: ExternalModuleInformation[],\n attributeName: string,\n value: string,\n ): Promise<void> {\n this._logRequest(\n 'modifyAttribute',\n groupId,\n JSON.stringify(moduleIdObjects),\n attributeName,\n value,\n );\n return this._glueLogic.modifyAttribute(\n groupId,\n moduleIdObjects,\n attributeName,\n value,\n );\n }\n\n public updateAttribute(\n rootModuleId: string,\n moduleId: string | null,\n attributeId: string,\n attributeValue: string | boolean,\n ): Promise<void> {\n this._logRequest(\n 'updateAttribute',\n rootModuleId,\n moduleId,\n attributeId,\n attributeValue.toString(),\n );\n return this._glueLogic.updateAttribute(\n rootModuleId,\n moduleId,\n attributeId,\n attributeValue,\n );\n }\n\n public getVerifiedAttributeOptions(\n moduleId: string,\n attributeIds?: string | string[],\n ): Promise<Record<string, CheckDropDownResult> | undefined> {\n this._logRequest(\n 'getVerifiedAttributeOptions',\n moduleId,\n attributeIds ? JSON.stringify(attributeIds) : '[]',\n );\n return this._glueLogic.getVerifiedAttributeOptions(moduleId, attributeIds);\n }\n\n public getVerifiedGroupAttributeOptions(\n groupId: string,\n attributeIds?: string | string[],\n ): Promise<Record<string, CheckDropDownResult> | undefined> {\n this._logRequest(\n 'getVerifiedGroupAttributeOptions',\n groupId,\n attributeIds ? JSON.stringify(attributeIds) : '[]',\n );\n return this._glueLogic.getVerifiedGroupAttributeOptions(\n groupId,\n attributeIds,\n );\n }\n\n public updateProperty(\n rootModuleId?: string,\n propertyName?: string,\n propertyValue?: string | number | boolean,\n ): void {\n this._logRequest(\n 'updateProperty',\n rootModuleId ?? 'undefined',\n propertyName ?? 'undefined',\n propertyValue?.toString() ?? 'undefined',\n );\n this._glueLogic.updateProperty(rootModuleId, propertyName, propertyValue);\n }\n\n public findValidSubArticles(posGroupIds: string[] | string): PosArticle[] {\n this._logRequest(\n 'findValidSubArticles',\n Array.isArray(posGroupIds) ? JSON.stringify(posGroupIds) : posGroupIds,\n );\n return this._glueLogic.findValidSubArticles(posGroupIds);\n }\n\n public getValidContainerModulesForSubArticle(\n posGroupIds: string[] | string,\n subArticleId: string,\n ): ValidContainerModules[] {\n this._logRequest(\n 'getValidContainerModulesForSubArticle',\n Array.isArray(posGroupIds) ? JSON.stringify(posGroupIds) : posGroupIds,\n subArticleId,\n );\n return this._glueLogic.getValidContainerModulesForSubArticle(\n posGroupIds,\n subArticleId,\n );\n }\n\n public addSubArticle(\n articleId: string,\n rootModuleId: string,\n parentModuleId: string,\n insertPosition?: number[],\n ): Promise<void> {\n this._logRequest(\n 'addSubArticle',\n articleId,\n rootModuleId,\n parentModuleId,\n insertPosition ? JSON.stringify(insertPosition) : 'undefined',\n );\n return this._glueLogic.addSubArticle(\n articleId,\n rootModuleId,\n parentModuleId,\n insertPosition,\n );\n }\n\n public moveSubArticle(\n articleId: string,\n subModuleId: string,\n rootModuleId: string,\n parentModuleId: string,\n insertPosition?: number[],\n ): Promise<void> {\n this._logRequest(\n 'moveSubArticle',\n articleId,\n subModuleId,\n rootModuleId,\n parentModuleId,\n insertPosition ? JSON.stringify(insertPosition) : 'undefined',\n );\n return this._glueLogic.moveSubArticle(\n articleId,\n subModuleId,\n rootModuleId,\n parentModuleId,\n insertPosition,\n );\n }\n\n public deleteSubArticles(\n groupId: string,\n subModuleIds: string[] | string,\n ): Promise<void> {\n this._logRequest(\n 'deleteSubArticles',\n groupId,\n Array.isArray(subModuleIds) ? JSON.stringify(subModuleIds) : subModuleIds,\n );\n return this._glueLogic.deleteSubArticles(groupId, subModuleIds);\n }\n\n public swapRootModule(\n groupId: string,\n rootModuleId: string,\n articleId: string,\n ): Promise<void> {\n this._logRequest('swapRootModule', groupId, rootModuleId, articleId);\n return this._glueLogic.swapRootModule(groupId, rootModuleId, articleId);\n }\n\n public changedGroupPlanningSituation(\n changedGroup: ExternalObjectGroup,\n objectPositionChanged: boolean,\n ): Promise<void> {\n this._logRequest(\n 'changedGroupPlanningSituation',\n changedGroup.groupId,\n objectPositionChanged.toString(),\n );\n return this._glueLogic.changedGroupPlanningSituation(\n changedGroup,\n objectPositionChanged,\n );\n }\n\n public changedGroupFromHistory(\n posDataJson: PosGroup,\n reloadGroup: boolean,\n ): void {\n this._logRequest(\n 'changedGroupFromHistory',\n posDataJson.id,\n reloadGroup.toString(),\n );\n this._glueLogic.changedGroupFromHistory(posDataJson, reloadGroup);\n }\n\n public loadedGroup(posDataJson: PosGroup): Promise<void> {\n this._logRequest('loadedGroup', posDataJson.id);\n return this._glueLogic.loadedGroup(posDataJson);\n }\n\n public groupsCompletelyLoaded(): void {\n this._logRequest('groupsCompletelyLoaded');\n this._glueLogic.groupsCompletelyLoaded();\n }\n\n public removedGroup(groupId: string): void {\n this._logRequest('removedGroup', groupId);\n this._glueLogic.removedGroup(groupId);\n }\n\n public openCloseGroup(groupId: string): void {\n this._logRequest('openCloseGroup', groupId);\n this._glueLogic.openCloseGroup(groupId);\n }\n\n public getSaveDataGroups(): Promise<PosGroup[] | null> {\n this._logRequest('getSaveDataGroups');\n return this._glueLogic.getSaveDataGroups();\n }\n\n public getSubArticleId(id: string): string | undefined {\n this._logRequest('getSubArticleId', id);\n return this._glueLogic.getSubArticleId(id);\n }\n\n public async newPosDataFromId(id: string): Promise<PosGroup | undefined> {\n this._logRequest('newPosDataFromId', id);\n return this._glueLogic.newPosDataFromId(id);\n }\n\n public async createOrReplacePosDataFromArticleLayout(\n articleLayoutJson: ExternalObjectGroupLayout,\n layoutType: string,\n posArticles?: PosArticle[],\n ): Promise<PosGroup | PosGroup[] | undefined> {\n this._logRequest(\n 'createOrReplacePosDataFromArticleLayout',\n layoutType,\n JSON.stringify(articleLayoutJson),\n );\n return this._glueLogic.createOrReplacePosDataFromArticleLayout(\n articleLayoutJson,\n layoutType,\n posArticles,\n );\n }\n\n public async getPlanContext(\n include?: HiPlanContextSection[],\n options?: HiPlanContextOptions,\n ): Promise<HiPlanContext> {\n this._logRequest(\n 'getPlanContext',\n JSON.stringify(include),\n JSON.stringify(options),\n );\n return this._glueLogic.getPlanContext(include, options);\n }\n\n public async getLibraryContext(\n include?: HiLibraryContextSection[],\n options?: HiLibraryContextOptions,\n ): Promise<HiLibraryContext> {\n this._logRequest(\n 'getLibraryContext',\n JSON.stringify(include),\n JSON.stringify(options),\n );\n return this._glueLogic.getLibraryContext(include, options);\n }\n\n public executeGroupOperation(\n command: string,\n payload: unknown,\n ): Promise<HiGroupOperationResult | HiToolCommandResult> {\n this._logRequest('executeGroupOperation', command, JSON.stringify(payload));\n return this._glueLogic.executeGroupOperation(command, payload);\n }\n\n public getAgentPrompts(): HiAgentPrompts {\n this._logRequest('getAgentPrompts');\n return this._glueLogic.getAgentPrompts();\n }\n\n public async newPosDataFromGroup(posDataJson: PosGroup): Promise<PosGroup> {\n this._logRequest('newPosDataFromId', JSON.stringify(posDataJson));\n return this._glueLogic.newPosDataFromGroup(posDataJson);\n }\n\n public getGroupDataForOrder(\n options: GetGroupDataForOrderOptions,\n ): Promise<HiOrderData | null> {\n this._logRequest(\n 'getGroupDataForOrder',\n options.roomlePlannerId,\n options.mode,\n );\n return this._glueLogic.getGroupDataForOrder(options);\n }\n\n public getMaterialUrl(\n materialId: string,\n groupOrModuleId?: string,\n ): string | null {\n this._logRequest('getMaterialUrl', materialId, groupOrModuleId);\n return this._glueLogic.getMaterialUrl(materialId, groupOrModuleId);\n }\n}\n\nexport class GlueLayerResponseDebugLogging implements RoomDesignerRequests {\n private _roomDesignerRequests: RoomDesignerRequests;\n private _hiCallbacks: HiCallbacks;\n\n constructor(\n roomDesignerRequests: RoomDesignerRequests,\n hiCallbacks: HiCallbacks,\n ) {\n this._roomDesignerRequests = roomDesignerRequests;\n this._hiCallbacks = hiCallbacks;\n }\n\n private _logResponse(message: string, ...args: Array<string | null>) {\n let messageAndArgs = message;\n if (args) {\n args.forEach((item) => {\n messageAndArgs += ' ' + item;\n });\n }\n this._hiCallbacks.onLogMessage?.('HI RESPONSE', messageAndArgs);\n }\n\n public loadMasterData(masterData: any): void {\n this._logResponse('loadMasterData');\n this._roomDesignerRequests.loadMasterData(masterData);\n }\n\n public async loadPosGroups(\n posDataJson: PosGroup | PosGroup[],\n options: LoadExternalObjectOptions,\n ): Promise<void> {\n const groupIds = Array.isArray(posDataJson)\n ? posDataJson.map((group) => group.id).join(',')\n : posDataJson.id;\n this._logResponse(\n 'loadPosGroups',\n groupIds,\n options.reason ?? 'undefined',\n options.findFreeSpaceInPlan?.toString() ?? 'false',\n options.moduleIdMap ? JSON.stringify(options.moduleIdMap) : '[]',\n options.mergedGroups ? JSON.stringify(options.mergedGroups) : '[]',\n );\n return this._roomDesignerRequests.loadPosGroups(posDataJson, options);\n }\n\n public completelyLoaded(): void {\n this._logResponse('completelyLoaded');\n this._roomDesignerRequests.completelyLoaded();\n }\n\n public async selectGroup(groupId: string): Promise<void> {\n this._logResponse('selectGroup', groupId);\n return this._roomDesignerRequests.selectGroup(groupId);\n }\n\n public async selectRoot(rootModuleId: string): Promise<void> {\n this._logResponse('selectRoot', rootModuleId);\n return this._roomDesignerRequests.selectRoot(rootModuleId);\n }\n\n public async selectModule(\n rootModuleId: string,\n subModuleId: string,\n ): Promise<void> {\n this._logResponse('selectModule', rootModuleId, subModuleId);\n return this._roomDesignerRequests.selectModule(rootModuleId, subModuleId);\n }\n\n public openCloseGroup(\n groupOrRootModuleId: string,\n subModuleId: string | null,\n open: boolean,\n animate: boolean,\n ) {\n this._logResponse(\n 'openCloseGroup',\n groupOrRootModuleId,\n subModuleId,\n open.toString(),\n animate.toString(),\n );\n return this._roomDesignerRequests.openCloseGroup(\n groupOrRootModuleId,\n subModuleId,\n open,\n animate,\n );\n }\n\n public deleteGroup(groupId: string): Promise<void> {\n this._logResponse('deleteGroup', groupId);\n return this._roomDesignerRequests.deleteGroup(groupId);\n }\n\n public deleteRootModule(rootModuleId: string): Promise<void> {\n this._logResponse('deleteRootModule', rootModuleId);\n return this._roomDesignerRequests.deleteRootModule(rootModuleId);\n }\n\n public mergeGroups(groupIds: string[]): Promise<void> {\n this._logResponse('mergeGroups', JSON.stringify(groupIds));\n return this._roomDesignerRequests.mergeGroups(groupIds);\n }\n\n public getPosDataOfAllGroups(): Promise<PosGroup[]> {\n this._logResponse('getPosDataOfAllGroups');\n return this._roomDesignerRequests.getPosDataOfAllGroups();\n }\n\n public getRoomInformation(\n mode?: PlanRoomGeometryMode,\n ): Promise<ExternalRoomInformation> {\n this._logResponse('getRoomInformation', mode ?? null);\n return this._roomDesignerRequests.getRoomInformation(mode);\n }\n\n public getPlanObstacles(): Promise<ExternalPlanObstacles> {\n this._logResponse('getPlanObstacles');\n return this._roomDesignerRequests.getPlanObstacles();\n }\n\n public saveExternalObjectSnapshot(): Promise<ExternalObjectSnapshotSaveResult | null> {\n this._logResponse('saveExternalObjectSnapshot');\n return this._roomDesignerRequests.saveExternalObjectSnapshot();\n }\n}\n","import { RoomDesignerApi } from './api';\nimport type { GlueLogic, HiAttributeOptionsResult } from './glue-logic';\nimport { GlueLogicImplementation, type LibraryData } from './glue-logic';\nimport { type HomagIntelligenceInitData } from './hi-api-types';\nimport { v4 as uuidv4 } from 'uuid';\nimport type {\n MasterData,\n PosArticle,\n PosContour,\n PosGroup,\n PosModuleAttribute,\n PosModuleData,\n PosRoom,\n SolveInitialResult,\n} from './model/oc-scripts-domain.model';\nimport { initCallbacks } from './callbacks';\nimport { type RoomlePlanner } from '../../planner-core/src/roomle-planner';\nimport Orders from './orders';\nimport type {\n ExternalConfiguration,\n ExternalItem,\n} from '../../typings/external-objects';\nimport type { HiTagCatalogCallbacks } from './hi-tag-catalog-callbacks';\nimport type { HiCallbacks, HiOrderHeader } from '#/common/src/hi/hi-types';\nimport {\n GlueLayerRequestDebugLogging,\n GlueLayerResponseDebugLogging,\n} from './debug-logging';\nimport type { ExternalObjectValidContainerModules } from './external-object-api-callbacks';\n\ndeclare global {\n interface Window {\n uuidv4: () => string;\n }\n}\n\nconsole.warn('Homag Intelligence plugin is loaded.');\n\n// export const HOMAG_INTELLIGENCE_ENDPOINT = 'http://localhost:8080/proxy_request?url=';\n// export const HOMAG_INTELLIGENCE_ENDPOINT =\n// 'https://europe-west3-rml-showcases.cloudfunctions.net/proxy_request?url=';\n\nexport type ExternalObjects = Map<\n string,\n { id: string; label: string; items: any[] }\n>;\nexport type ExternalItems = Map<string, ExternalItem>;\nexport type ExternalConfigurations = Map<string, ExternalConfiguration>;\n\n/**\n * Serialization lock for _initCalcScript.\n * Concurrent calls share `window.exports`, so they must run one at a time.\n */\nlet calcScriptLock: Promise<void> = Promise.resolve();\n\nconst acquireCalcScriptLock = (): Promise<() => void> => {\n let release: () => void = () => {};\n const next = new Promise<void>((resolve) => {\n release = resolve;\n });\n const prev = calcScriptLock;\n calcScriptLock = next;\n return prev.then(() => release);\n};\n\nexport class HomagIntelligence {\n private _roomlePlanner: RoomlePlanner;\n private _api: RoomDesignerApi;\n private _glueLogic: GlueLogic;\n private _orders: Orders;\n private _hiCallbacks: HiCallbacks;\n\n constructor(\n roomlePlanner: RoomlePlanner,\n hiOptions: HomagIntelligenceInitData,\n hiCallbacks: HiCallbacks,\n getArrangementCorrectionEnabled: () => boolean = () => false,\n ) {\n if (!window.uuidv4) {\n window.uuidv4 = uuidv4; // Ensure uuidv4 is available globally\n }\n\n this._roomlePlanner = roomlePlanner;\n this._roomlePlanner.setHomagIntelligence(this);\n this._hiCallbacks = hiCallbacks;\n this._api = new RoomDesignerApi(this._roomlePlanner);\n\n if (hiOptions?.debugLogging) {\n const api = new GlueLayerResponseDebugLogging(this._api, hiCallbacks);\n const glueLogic = new GlueLogicImplementation(\n api,\n hiCallbacks,\n getArrangementCorrectionEnabled,\n );\n this._glueLogic = new GlueLayerRequestDebugLogging(\n glueLogic,\n hiCallbacks,\n );\n } else {\n this._glueLogic = new GlueLogicImplementation(\n this._api,\n hiCallbacks,\n getArrangementCorrectionEnabled,\n );\n }\n initCallbacks(this._roomlePlanner, this._glueLogic);\n this._orders = new Orders(roomlePlanner, this._glueLogic);\n }\n\n /**\n * Loads previously saved PosGroup data via hiCallbacks.\n * Must be called after construction to restore saved state.\n */\n public async loadSavedPosData(): Promise<void> {\n const savedPosGroupData =\n (await this._hiCallbacks.onGetSavedPosGroupData?.()) ?? null;\n await this._glueLogic.setPosDataForLoading(savedPosGroupData);\n }\n\n public async loadLibrary(libraryId: string) {\n const libraryData = await this._loadLibraryData(libraryId);\n await this._glueLogic.addLibrary(libraryData);\n }\n\n public async loadCatalog(\n libraryId: string,\n articles: any,\n catalogCallbacks: HiTagCatalogCallbacks,\n ) {\n catalogCallbacks?.setEmulator(this._glueLogic);\n this._glueLogic.loadPosData(await articles, libraryId);\n }\n\n private async _loadLibraryData(libraryId: string): Promise<LibraryData> {\n if (this._glueLogic.isLibraryLoaded(libraryId)) {\n const data = this._glueLogic.getLibraryData(libraryId);\n if (data !== null) {\n return data;\n }\n }\n const hiCallbacks = this._glueLogic.hiCallbacks;\n if (hiCallbacks === null) {\n throw new Error('HiCallbacks not initialized');\n }\n const { masterData, libraryExports } = await this._requestHiLibrary(\n libraryId,\n hiCallbacks,\n );\n this._loadMasterData(masterData);\n const libraryData: LibraryData = {\n supportsInteriorDesign: [\n 'getValidSubArticles',\n 'getValidContainerModulesForSubArticle',\n 'addSubArticle',\n 'deleteSubArticle',\n ].every((name) => typeof libraryExports[name] === 'function'),\n libraryId,\n masterData,\n posGroupVersion: 1,\n initializePosGroup: (posGroup: PosGroup): void => {\n if (!libraryExports.initializePosGroup) {\n return;\n }\n libraryExports.initializePosGroup(posGroup);\n },\n solveInitial: (\n posGroup: PosGroup,\n masterData: MasterData,\n ): SolveInitialResult => {\n if (!libraryExports.solveInitial) {\n return { logs: [], hasChanged: false };\n }\n return libraryExports.solveInitial(posGroup, masterData);\n },\n solveInitialModule: (\n module: PosModuleData,\n masterData: MasterData,\n articleId: string,\n ): SolveInitialResult => {\n if (!libraryExports.solveInitialModule) {\n return { logs: [], hasChanged: false };\n }\n return libraryExports.solveInitialModule(module, masterData, articleId);\n },\n calculateGroup: (groupData: PosGroup): PosGroup => {\n return libraryExports.calc(groupData);\n },\n getOrderData: (\n groupData: PosGroup[],\n roomlePlannerId?: string,\n rooms?: PosContour[],\n ): any => {\n return libraryExports.getOrderData(\n groupData,\n roomlePlannerId,\n rooms,\n masterData,\n );\n },\n getAttributesDropDownValues: async (\n module: PosModuleData,\n attributeIds?: string | string[],\n ): Promise<Record<string, HiAttributeOptionsResult>> => {\n const ids = attributeIds\n ? Array.isArray(attributeIds)\n ? attributeIds\n : [attributeIds]\n : (module.attributes ?? []).map((attribute) => attribute.id);\n const attributeOptions: Record<string, any[]> = {};\n for (const attributeId of ids) {\n try {\n const attributeDropDownApi =\n libraryExports.getAttributesDropDownValuesV2 ??\n libraryExports.getAttributesDropDownValues;\n const options = await attributeDropDownApi(module, attributeId);\n attributeOptions[attributeId] = options;\n } catch (error) {\n console.error(error);\n attributeOptions[attributeId] = [];\n }\n }\n return attributeOptions;\n },\n solveModuleAttributeConflict: (\n module: PosModuleData,\n attributeName: string,\n value: string | number | boolean,\n ): PosModuleAttribute[] | undefined => {\n if (!libraryExports.solveModuleAttributeConflict) {\n return undefined;\n }\n const results = libraryExports.solveModuleAttributeConflict(\n module,\n attributeName,\n value,\n );\n return results;\n },\n groupAdjust: (\n posGroup: PosGroup,\n articles: PosArticle[],\n roomInformation: PosRoom,\n ): PosGroup => {\n if (!libraryExports.groupAdjust) {\n return posGroup;\n }\n const results = libraryExports.groupAdjust(\n posGroup,\n articles,\n roomInformation,\n );\n return results;\n },\n getValidSubArticles(\n calculatedPosGroup: PosGroup,\n articles: PosArticle[],\n masterData: MasterData,\n ): PosArticle[] {\n if (!libraryExports.getValidSubArticles) {\n return [];\n }\n const results = libraryExports.getValidSubArticles(\n calculatedPosGroup,\n articles,\n masterData,\n );\n return results;\n },\n getValidContainerModulesForSubArticle(\n calculatedPosGroup: PosGroup,\n subArticle: PosArticle,\n masterData: MasterData,\n ): ExternalObjectValidContainerModules[] {\n if (!libraryExports.getValidContainerModulesForSubArticle) {\n return [];\n }\n const results = libraryExports.getValidContainerModulesForSubArticle(\n calculatedPosGroup,\n subArticle,\n masterData,\n );\n return results;\n },\n addSubArticle(\n targetPosGroup: PosGroup,\n article: PosArticle,\n rootId: string,\n parentModuleId: string,\n insertPosition?: number[],\n masterData?: MasterData,\n ): PosGroup {\n if (!libraryExports.addSubArticle) {\n return targetPosGroup;\n }\n const results = libraryExports.addSubArticle(\n targetPosGroup,\n article,\n rootId,\n parentModuleId,\n insertPosition,\n masterData,\n );\n return results;\n },\n deleteSubArticle(\n targetPosGroup: PosGroup,\n rootId: string,\n articleModuleId: string,\n ): PosGroup {\n if (!libraryExports.deleteSubArticle) {\n return targetPosGroup;\n }\n const results = libraryExports.deleteSubArticle(\n targetPosGroup,\n rootId,\n articleModuleId,\n );\n return results;\n },\n };\n return libraryData;\n }\n\n public async _requestHiLibrary(\n libraryId: string,\n hiCallbacks: HiCallbacks,\n ): Promise<{\n masterData: MasterData;\n libraryExports: any;\n }> {\n const [masterData, calcScriptString] = await Promise.all([\n hiCallbacks.onLoadMasterData(libraryId),\n hiCallbacks.onLoadJavascript(libraryId),\n ]);\n const libraryExports = await this._initCalcScript(calcScriptString);\n return {\n masterData,\n libraryExports,\n };\n }\n\n private _loadMasterData(masterData: MasterData): void {\n return this._api.loadMasterData(masterData);\n }\n\n private async _initCalcScript(scriptText: string): Promise<any> {\n // Acquire the lock so concurrent _initCalcScript calls don't corrupt\n // each other's window.exports (which is a shared global).\n const release = await acquireCalcScriptLock();\n let blobUrl: string | undefined;\n try {\n window.exports = {};\n const blob = new Blob([scriptText], { type: 'text/javascript' });\n blobUrl = URL.createObjectURL(blob);\n // oxlint-disable-next-line roomle/no-runtime-cdn-import -- HOMAG ships calc.js as script text; it runs from a blob URL, not a CDN\n await import(blobUrl);\n return window.exports;\n } catch (e) {\n console.error(e);\n throw new Error('Failed to load calc.js!');\n } finally {\n if (blobUrl) {\n URL.revokeObjectURL(blobUrl);\n }\n release();\n }\n }\n\n public getGlueLogic(): GlueLogic {\n return this._glueLogic;\n }\n\n public async placeOrder(\n withPrice: boolean = true,\n orderHeader?: HiOrderHeader,\n ) {\n await this._orders.placeOrder(withPrice, orderHeader);\n }\n\n public async fetchPrice(planId?: string, orderHeader?: HiOrderHeader) {\n return this._orders.fetchPrice(planId, orderHeader);\n }\n}\n"],"x_google_ignoreList":[0,1,2,3],"mappings":";;;;AACA,IAAM,IAAY,EAAE;AACpB,KAAK,IAAI,IAAI,GAAG,IAAI,KAAK,EAAE,EACvB,GAAU,MAAM,IAAI,KAAO,SAAS,GAAG,CAAC,MAAM,EAAE,CAAC;AAErD,SAAgB,EAAgB,GAAK,IAAS,GAAG;AAC7C,SAAQ,EAAU,EAAI,IAAS,MAC3B,EAAU,EAAI,IAAS,MACvB,EAAU,EAAI,IAAS,MACvB,EAAU,EAAI,IAAS,MACvB,MACA,EAAU,EAAI,IAAS,MACvB,EAAU,EAAI,IAAS,MACvB,MACA,EAAU,EAAI,IAAS,MACvB,EAAU,EAAI,IAAS,MACvB,MACA,EAAU,EAAI,IAAS,MACvB,EAAU,EAAI,IAAS,MACvB,MACA,EAAU,EAAI,IAAS,OACvB,EAAU,EAAI,IAAS,OACvB,EAAU,EAAI,IAAS,OACvB,EAAU,EAAI,IAAS,OACvB,EAAU,EAAI,IAAS,OACvB,EAAU,EAAI,IAAS,MAAM,aAAa;;;;ACzBlD,IAAI,GACE,IAAQ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