PageSourceSearch

https://www.kaucim.ai/_next/static/chunks/5845.376bd024fdb81f1d.js

js kaucim.ai collected 2026-09-24 14:30:39 UTC 10,188 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5845],{7087:(t,e,n)=>{n.r(e),n.d(e,{createScene:()=>v});var r=n(90072),a=n(50219),o=n(32683),i=n(89868),s=n(22275);function c(t,e){var n=Math.sqrt(Math.max(0,1-t*t)),r=.02*(1-t*t);return[1.3*t,-.23+.62*n*Math.sin(e),r+(1.45*n-r)*(1-Math.cos(e))/2-.7]}var f=[["flat","flat"],["flat","curved"],["curved","flat"],["curved","curved"]];function u(t){return t.map(function(t){return"flat"===t?"f":"c"}).join("")}function l(t){var e=new DataView(t),n=0,r=function(){var t=e.getInt16(n,!0);return n+=2,t};if(1!==r())throw Error("motion_version");var a=r();if(a<1||a>32)throw Error("motion_count");for(var o=[],i=0;i<a;i++){var s=r(),c=r(),u=r()/1e3,l=f[r()];if(!l||s<2||s>140||c<0||c>100||u<=0||u>4)throw Error("motion_invalid");for(var h=[],d=0;d<s;d++)h.push([0,1].map(function(){return{p:[r()/1e3,r()/1e3,r()/1e3],q:[r()/1e4,r()/1e4,r()/1e4,r()/1e4]}}));for(var m=[],p=0;p<c;p++)m.push({time:r()/1e3,strength:r()/1e3,kind:r()?"wood":"table"});o.push({frames:h,impacts:m,duration:u,faces:l,stable:!0})}if(n!==t.byteLength)throw Error("motion_length");return o}var h={flat:{width:362,height:457,top:18,length:367,inner:337,outer:[285,193,135,96,68,51,48,62,102,184,306]},dome:{width:337,height:471,top:16,length:373,inner:24,outer:[75,160,215,257,285,306,318,319,305,269,180]}},d=i.cj9.clamp,m={lacquer:{dome:"/jiaobei-dome.webp",flats:["/jiaobei-flat.webp"]},brass:{dome:"/jiaobei/skins/brass/dome.webp",flats:["/jiaobei/skins/brass/flat-0.webp","/jiaobei/skins/brass/flat-1.webp"],fit:"/jiaobei/skins/brass/fit.json"}};function p(t,e){for(var n=t.userData.faces,r=[],a=0;a<n.length;a+=3)r.push.apply(r,(0,o._)(function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:h,a=n?r.flat:r.dome,o=Math.min(10*t,9.999),i=Math.floor(o),s=function(t){return t[i]+(t[i+1]-t[i])*(o-i)},c=s(a.outer),f=(1-Math.cos(e*Math.PI))/2,u="number"==typeof a.inner?a.inner:s(a.inner),l=a.top+t*a.length;return[(u+(c-u)*f)/a.width,1-l/a.height]}(n[a],n[a+1],1===n[a+2],e)));t.setAttribute("uv",new i.qtW(r,2))}function v(t,e,n){var f=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"lacquer",v=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,w=getComputedStyle(t),g=function(t){return new i.Q1f(w.getPropertyValue(t).trim())},b=new s.JeP({alpha:!0,antialias:!0,powerPreference:"low-power"});b.setPixelRatio(Math.min(devicePixelRatio||1,1.7)),b.setClearAlpha(0),b.shadowMap.enabled=!0,b.shadowMap.type=i.QP0,b.toneMapping=i.FV,b.toneMappingExposure=.82;var M=b.domElement;M.setAttribute("aria-hidden","true"),t.append(M);var y=new i.Z58,P=new i.qUd(-4.7,4.7,4,-4,.1,40);P.position.set(0,8.5,7),P.lookAt(0,0,0);var q=new i.ZyN(g("--color-paper"),1.8);q.position.set(-3,7,4),q.castShadow=!0,q.shadow.mapSize.set(1024,1024),q.shadow.camera.left=-5,q.shadow.camera.right=5,q.shadow.camera.top=5,q.shadow.camera.bottom=-5,q.shadow.normalBias=.025,q.shadow.bias=-2e-4,y.add(q);var A=[],_=m[f],x=[_.dome].concat((0,o._)(_.flats)),E=x.map(function(){return new i.V9B({color:g("--color-cinnabar-dark"),toneMapped:!1})}),k=function(t){var e=[],n=[],s=[];function f(t,r,i){for(var f=arguments.length>3&&void 0!==arguments[3]&&arguments[3],u=0,l=[t,r,i];u<l.length;u++){var h=(0,a._)(l[u],2),d=h[0],m=h[1],p=c(-.985+1.97*d/42,m*Math.PI/24);f&&(p[1]=-.23),e.push.apply(e,(0,o._)(p)),s.push(d/42,m/24),n.push(d/42,m/24,+!!f)}}for(var u=0;u<42;u++)for(var l=0;l<24;l++)f([u,l],[u,l+1],[u+1,l]),f([u+1,l],[u,l+1],[u+1,l+1]);for(var d=e.length/3,m=0;m<42;m++)for(var v=0;v<24;
1v++)f([m,v],[m+1,v],[m,v+1],!0),f([m+1,v],[m+1,v+1],[m,v+1],!0);for(var w=e.length/3-d,g=0,b=[0,42];g<b.length;g++)for(var M=b[g],y=1;y<24;y++){var P=[M,0],q=[M,y],A=[M,y+1];f(P,0===M!==t?q:A,0===M!==t?A:q)}var _=new i.LoY;_.addGroup(0,d,0),_.addGroup(d,w,1),_.addGroup(d+w,e.length/3-d-w,0),_.setAttribute("position",new i.qtW(e,3)),_.userData.faces=n,p(_,h),_.computeVertexNormals();for(var x=_.getAttribute("normal"),E=0;E<6048;E++){var k=s[2*E],j=s[2*E+1],z=-.985+1.97*k,S=j*Math.PI,F=(0,r._)(i.Pq0,(0,o._)(c(z,S))),R=(0,r._)(i.Pq0,(0,o._)(c(z+1e-4,S))).sub(F),C=(0,r._)(i.Pq0,(0,o._)(c(z,S+1e-4))).sub(F).cross(R).normalize();x.setXYZ(E,C.x,C.y,C.z)}return _}("lacquer"!==f),j=Promise.all((0,o._)(x.map(function(t,e){return new i.Tap().loadAsync(t).then(function(t){if(B)return void t.dispose();t.colorSpace=i.er$,t.anisotropy=Math.min(8,b.capabilities.getMaxAnisotropy()),A.push(t),E[e].map=t,E[e].color.setRGB(1,1,1),E[e].needsUpdate=!0,Q()})})).concat([_.fit&&fetch(_.fit).then(function(t){if(!t.ok)throw Error("finish_fit");return t.json()}).then(function(t){B||(p(k,t),Q())})]));j.catch(function(){}),t.dataset.skin=f,delete t.dataset.motion,delete t.dataset.faces;var z=[0,1].map(function(t){var e=new i.eaF(k,[E[0],E[1+Math.min(t,_.flats.length-1)]]);return e.castShadow=!0,e.receiveShadow=!0,y.add(e),e}),S=new i.q2({color:g("--color-ink"),opacity:.22}),F=new i.bdM(7.3,5.3),R=new i.eaF(F,S);R.rotation.x=-Math.PI/2,R.position.y=-.015,R.receiveShadow=!0,y.add(R);var C=new Map,I=new Set;function L(t,e){var n="".concat(t,"-").concat(e),r=C.get(n);if(!r){var a=new AbortController;I.add(a);var o=setTimeout(function(){return a.abort()},1800);r=fetch("/jiaobei/motions-v1/".concat(n,".bin"),{signal:a.signal}).then(function(t){if(!t.ok)throw Error("motion_download");return t.arrayBuffer()}).then(l).catch(function(t){throw C.delete(n),t}).finally(function(){clearTimeout(o),I.delete(a)}),C.set(n,r),C.size>6&&C.delete(C.keys().next().value)}return r}var T=0,B=!1,D=0,O=0,V=null,G=null,N=null,Z=["flat","curved"];function Q(){B||(b.render(y,P),t.dataset.renderCount=String(++D))}function U(t){return{p:t.position.toArray(),q:t.quaternion.toArray()}}function W(e){("rest"!==t.dataset.motion||t.dataset.faces!==u(e))&&(Z=e,z.forEach(function(t,n){t.rotation.set("flat"===e[n]?Math.PI:0,0,0);var r=new i.PTz().setFromAxisAngle(new i.Pq0(0,1,0),n?-.5:.42);t.quaternion.premultiply(r),t.position.set(n?1.5:-1.5,"flat"===e[n]?.39:.23,n?-.15:.15)}),t.dataset.faces=u(e),t.dataset.motion="rest",Q())}function X(){if(G){var e,n=G;G=null,T&&cancelAnimationFrame(T),T=0,e=n.motion.frames[n.motion.frames.length-1],z.forEach(function(t,n){t.position.fromArray(e[n].p),t.quaternion.fromArray(e[n].q)}),t.dataset.motion="rest",t.dataset.faces=u(Z),t.dataset.lastCastFrames=String(D-n.firstRender),t.dataset.lastCastMs=String(Math.round(performance.now()-n.start)),Q(),n.resolve()}}function Y(t){try{!function(t){if(T=0,!B&&!document.hidden){if(V){var n=(t-V.start)/1e3;z.forEach(function(t,e){var r=new i.Pq0(V.x+(e?1.52:-1.52),1.6+.07*Math.sin(5*n+e),V.z+(e?.25:-.25));t.position.lerp(r,.25),t.rotateX(.018+.008*V.energy),t.rotateZ(e?.012:-.014)}),V.energy*=.93}else if(G){var r,a,o,s,c,f,u,l=(r=G.motion,a=Math.max(0,t-G.start)/1e3,u=(f=Math.min((c=Math.min(Math.floor(s=30*(o=Math.min(r.duration,a*Math.max(1,r.duration/2.7)))),r.frames.length-1))+1,r.frames.length-1))===r.frames.length-1?Math.max(0,Math.min(1,(o-c/30)/Math.max(.001,r.duration-c/30))):s-c,{elapsed:a,time:o,a:c,b:f,blend:u}),h=l.elapsed,d=l.time,m=l.a,p=l.b,v=l.blend;for(z.forEach(function(t,e){var n=new i.Pq0().fromArray(G.motion.frames[m][e].p).lerp(new i.Pq0().fromArray(G.motion.frames[p][e].p),v),r=new i.PTz().fromArray(G.motion.frames[m][e].q).slerp(new i.PTz().fromArray(G.motion.frames[p][e].q),v),a=Math.min(1,h/.12);t.position.fromArray(G.from[e].p).lerp(n,a),t.quaternion.fromArray(G.from[e].q).slerp(r,a)});G.hit<G.motion.impacts.length&&G.motion.impacts[G.hit].time<=d;){var w=G.motion.impacts[G.hit++];e(w.strength,w.kind)}if(d>=G.motion.duration)return X()}Q(),(V||G)&&(T=requestAnimationFrame(Y))}}(t)}catch(t){$()}}function J(){T||document.hidden||(T=requestAnimationFrame(Y))}function $(){if(!B){var t=N;N=null,null==t||t.reject(),X(),V=null,n()}}function H(){if(!B){var e=t.getBoundingClientRect();if(e.width&&e.height){b.setSize(e.width,e.height,!1);var n=e.width/e.height,r=Math.max(8.25,6.5*n),a=r/n;P.left=-r/2,P.right=r/2,P.top=a/2,P.bottom=-a/2,P.zoom=v,P.updateProjectionMatrix(),Q()}}}var K=new ResizeObserver(H);K.observe(t);var tt=function(){document.hidden&&(T&&cancelAnimationFrame(T),T=0,V=null,X(),N||W(Z))};document.addEventListener("visibilitychange",tt);var te=function(t){t.preventDefault(),$()};return M.addEventListener("webglcontextlost",te),W(Z),H(),{settled:W,prepare:function(){return Promise.all([L(0,0),j])},prefetch:function(t){L((Math.round(Math.atan2(t.z,t.x)/(Math.PI/4))+8)%8,t.speed<.4?0:t.speed<1.8?1:2).catch(function(){})},grab:function(e,n){G||N||(V={x:e,z:n,start:performance.now(),energy:0},t.dataset.motion="held",J())},move:function(t,e){V&&(V.energy=Math.min(4,V.energy+5*Math.hypot(t-V.x,e-V.z)),V.x=d(t,-1,1),V.z=d(e,-.65,.65))},cancel:function(){V=null,G||N||(T&&cancelAnimationFrame(T),T=0,W(Z))},roll:function(e,n){return V=null,t.dataset.motion="preparing",new Promise(function(r,a){var o=(Math.round(Math.atan2(n.z,n.x)/(Math.PI/4))+8)%8,i=n.speed<.4?0:n.speed<1.8?1:2,s={id:++O,faces:e,resolve:r,reject:function(){return a(Error("physics_unavailable"))},from:z.map(U)};N=s,L(o,i).then(function(n){if(!B&&(null==N?void 0:N.id)===s.id){var a=n.filter(function(t){return u(t.faces)===u(e)});if(!a.length)throw Error("motion_faces");var o=a[Math.floor(Math.random()*a.length)];N=null,Z=e,G={motion:o,start:performance.now(),from:s.from,firstRen
1der:D,resolve:r,hit:0},t.dataset.motion="rolling",document.hidden?X():J()}}).catch(function(){B||(null==N?void 0:N.id)!==s.id||$()})})},finish:X,destroy:function(){B=!0,T&&cancelAnimationFrame(T),I.forEach(function(t){return t.abort()}),K.disconnect(),document.removeEventListener("visibilitychange",tt),M.removeEventListener("webglcontextlost",te),k.dispose(),E.forEach(function(t){return t.dispose()}),A.forEach(function(t){return t.dispose()}),S.dispose(),F.dispose(),q.shadow.dispose(),b.dispose(),M.remove()}}}},84823:(t,e,n)=>{n.d(e,{_:()=>a});var r=n(25012);function a(t,e,n){return(a="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var a=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=(0,r._)(t)););return t}(t,e);if(a){var o=Object.getOwnPropertyDescriptor(a,e);return o.get?o.get.call(n||t):o.value}})(t,e,n||t)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.