PageSourceSearch

https://insight.aicluv.com/static/js/2684.ac34c19a.chunk.js

js aicluv.com collected 2026-10-02 01:23:27 UTC 17,872 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkturing_vision=self.webpackChunkturing_vision||[]).push([[2684],{96461:(e,t,r)=>{r.d(t,{h:()=>l});var o,i=r(9950),n=["title","titleId"];function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)({}).hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},a.apply(null,arguments)}function c(e,t){var r=e.title,c=e.titleId,l=function(e,t){if(null==e)return{};var r,o,i=function(e,t){if(null==e)return{};var r={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(-1!==t.indexOf(o))continue;r[o]=e[o]}return r}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(o=0;o<n.length;o++)r=n[o],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,n);return i.createElement("svg",a({width:12,height:18,viewBox:"0 0 12 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":c},l),r?i.createElement("title",{id:c},r):null,o||(o=i.createElement("path",{d:"M4.33126 16.9325L11.0967 8.31144C11.2266 8.14537 11.2916 7.99374 11.2916 7.82046C11.2916 7.52442 11.0606 7.30059 10.7429 7.30059H6.61288L8.75008 1.63267C9.04611 0.838435 8.21578 0.419658 7.71036 1.06948L0.944948 9.69051C0.814983 9.84936 0.75 10.001 0.75 10.1743C0.75 10.4775 0.981049 10.7014 1.29874 10.7014H5.42875L3.29154 16.3621C2.99551 17.1563 3.82584 17.5823 4.33126 16.9325ZM7.24104 9.52444H2.75002L6.74284 4.24641L4.79336 8.47028H9.2916L5.29878 13.7555L7.24104 9.52444Z",fill:"black",fillOpacity:.54})))}var l=i.forwardRef(c);r.p},24093:(e,t,r)=>{r.d(t,{A:()=>u});var o=r(23029),i=r(92901),n=r(85501),a=r(29426),c=r(9950),l=r(33509);const s=JSON.parse('{"color":["#97a7ff","#6877c0","#989fc1","#a4a5ab"],"backgroundColor":"rgba(0,0,0,0)","textStyle":{"fontFamily":"Roboto,\'Helvetica Neue\',Arial,sans-serif"},"title":{"textStyle":{"color":"#666666"},"subtextStyle":{"color":"#999999"}},"line":{"itemStyle":{"borderWidth":"2"},"symbolSize":"4","symbol":"emptyCircle","smooth":true},"radar":{"itemStyle":{"borderWidth":"2"},"lineStyle":{"width":"3"},"symbolSize":"4","symbol":"emptyCircle","smooth":true},"bar":{"itemStyle":{"barBorderWidth":"0","barBorderColor":"#444444"},"emphasis":{"itemStyle":{"barBorderWidth":"0","barBorderColor":"#444444"}}},"pie":{"itemStyle":{"borderWidth":"0","borderColor":"#444444"},"emphasis":{"itemStyle":{"borderWidth":"0","borderColor":"#444444"}}},"scatter":{"itemStyle":{"borderWidth":"0","borderColor":"#444444"},"emphasis":{"itemStyle":{"borderWidth":"0","borderColor":"#444444"}}},"boxplot":{"itemStyle":{"borderWidth":"0","borderColor":"#444444"},"emphasis":{"itemStyle":{"borderWidth":"0","borderColor":"#444444"}}},"parallel":{"itemStyle":{"borderWidth":"0","borderColor":"#444444"},"emphasis":{"itemStyle":{"borderWidth":"0","borderColor":"#444444"}}},"sankey":{"itemStyle":{"borderWidth":"0","borderColor":"#444444"},"emphasis":{"itemStyle":{"borderWidth":"0","borderColor":"#444444"}}},"funnel":{"itemStyle":{"borderWidth":"0","borderColor":"#444444"},"emphasis":{"itemStyle":{"borderWidth":"0","borderColor":"#444444"}}},"gauge":{"itemStyle":{"borderWidth":"0","borderColor":"#444444"},"emphasis":{"itemStyle":{"borderWidth":"0","borderColor":"#444444"}}},"candlestick":{"itemStyle":{"color":"#d0648a","color0":"#ffffff","borderColor":"#d0648a","borderColor0":"#22c3aa","borderWidth":1}},"graph":{"itemStyle":{"borderWidth":"0","borderColor":"#444444"},"lineStyle":{"width":1,"color":"#aaa"},"symbolSize":"4","symbol":"emptyCircle","smooth":true,"color":["#4ea397","#22c3aa","#7bd9a5"],"label":{"color":"#ffffff"}},"map":{"itemStyle":{"areaColor":"#eeeeee","borderColor":"#999999","borderWidth":"0.5"},"label":{"color":"#28544e"},"emphasis":{"itemStyle":{"areaColor":"rgba(34,195,170,0.25)","borderColor":"#22c3aa","borderWidth":"0.5"},"label":{"color":"rgb(52,158,142)"}}},"geo":{"itemStyle":{"areaColor":"#eeeeee","borderColor":"#999999","borderWidth":"0.5"},"label":{"color":"#28544e"},"emphasis":{"itemStyle":{"areaColor":"rgba(34,195,170,0.25)","borderColor":"#22c3aa","borderWidth":"0.5"},"label":{"color":"rgb(52,158,142)"}}},"categoryAxis":{"axisLine":{"show":true,"lineStyle":{"color":"#cccccc"}},"axisTick":{"show":false,"lineStyle":{"color":"#333333"}},"axisLabel":{"show":true,"color":"#999999"},"splitLine":{"show":true,"lineStyle":{"color":["#eeeeee"]}},"splitArea":{"show":false,"areaStyle":{"color":["rgba(250,250,250,0.3)","rgba(200,200,200,0.3)"]}}},"valueAxis":{"axisLine":{"show":true,"lineStyle":{"color":"#cccccc"}},"axisTick":{"show":false,"lineStyle":{"color":"#333333"}},"axisLabel":{"show":true,"color":"#999999"},"splitLine":{"show":true,"lineStyle":{"color":["#eeeeee"]}},"splitArea":{"show":false,"areaStyle":{"color":["rgba(250,250,250,0.3)","rgba(200,200,200,0.3)"]}}},"logAxis":{"axisLine":{"show":true,"lineStyle":{"color":"#cccccc"}},"axisTick":{"show":false,"lineStyle":{"color":"#333333"}},"axisLabel":{"show":true,"color":"#999999"},"splitLine":{"show":true,"lineStyle":{"color":["#eeeeee"]}},"splitArea":{"show":false,"areaStyle":{"color":["rgba(250,250,250,0.3)","rgba(200,200,200,0.3)"]}}},"timeAxis":{"axisLine":{"show":true,"lineStyle":{"color":"#cccccc"}},"axisTick":{"show":false,"lineStyle":{"color":"#333333"}},"axisLabel":{"show":true,"color":"#999999"},"splitLine":{"show":true,"lineStyle":{"color":["#eeeeee"]}},"splitArea":{"show":false,"areaStyle":{"color":["rgba(250,250,250,0.3)","rgba(200,200,200,0.3)"]}}},"toolbox":{"iconStyle":{"borderColor":"#aaaaaa"},"emphasis":{"iconStyle":{"borderColor":"#666"}}},"legend":{"textStyle":{"color":"#999999"}},"tooltip":{"axisPointer":{"lineStyle":{"color":"#ccc","width":1},"crossStyle":{"color":"#ccc","width":1}}},"timeline":{"lineStyle":{"color":"#349e8e","width":1},"itemStyle":{"color":"#349e8e","borderWidth":"1"},"controlStyle":{"color":"#349e8e","borderColor":"#349e8e","borderWidth":"0"},"checkpointStyle":{"color":"#22c3aa","borderColor":"rgba(34,195,170,0.25)"},"label":{"color":"#349e8e"},"emphasis":{"itemStyle":{"color":"#57e8d2"}}},"visualMap":{"color":["#d0648a","#22c3aa","rgba(123,217,165,0.2)"]}
1,"dataZoom":{"backgroundColor":"#fff","dataBackgroundColor":"#dedede","fillerColor":"rgba(34,195,170,0.25)","handleColor":"#dddddd","handleSize":"100%","textStyle":{"color":"#999"}},"markPoint":{"label":{"color":"#ffffff"},"emphasis":{"label":{"color":"#ffffff"}}}}');var d=r(44414);l.bf("turingvideo",s);const u=function(e){(0,n.A)(r,e);var t=(0,a.A)(r);function r(e){var i;return(0,o.A)(this,r),(i=t.call(this,e)).containerRef=void 0,i.echartsInstance=void 0,i.resize=function(){var e,t=i.props,r=t.width,o=t.height;null===(e=i.echartsInstance)||void 0===e||e.resize({width:r,height:o})},i.containerRef=(0,c.createRef)(),i}return(0,i.A)(r,[{key:"componentDidMount",value:function(){var e=this.props,t=e.width,r=e.height,o=e.options,i=e.onCreated,n=e.onClick,a=e.onTooltipClick,c=e.notMerge;this.echartsInstance=l.Ts(this.containerRef.current,"turingvideo",{width:t,height:r}),this.echartsInstance.setOption(o,c),n&&this.echartsInstance.on("click",n),a&&this.containerRef.current.addEventListener("click",a),i&&i(this.echartsInstance),window.addEventListener("resize",this.resize)}},{key:"componentDidUpdate",value:function(e){var t,r=e.width,o=e.height,i=e.options,n=e.onClick,a=e.onTooltipClick,c=e.notMerge,l=this.props,s=l.width,d=l.height,u=l.options,h=l.onClick,f=l.onTooltipClick,p=l.notMerge;i===u&&c===p||(null===(t=this.echartsInstance)||void 0===t||t.setOption(u,p));if(n!==h){var m,y;if(n)null===(m=this.echartsInstance)||void 0===m||m.off("click",n);if(h)null===(y=this.echartsInstance)||void 0===y||y.on("click",h)}a!==f&&(a&&this.containerRef.current.removeEventListener("click",a),f&&this.containerRef.current.addEventListener("click",f)),r===s&&o===d||this.resize()}},{key:"componentWillUnmount",value:function(){var e,t,r=this.props,o=r.onClick,i=r.onTooltipClick;o&&(null===(t=this.echartsInstance)||void 0===t||t.off("click",o));i&&this.containerRef.current.removeEventListener("click",i),null===(e=this.echartsInstance)||void 0===e||e.dispose(),window.removeEventListener("resize",this.resize)}},{key:"render",value:function(){var e=this.props.style;return(0,d.jsx)("div",{ref:this.containerRef,style:e})}}]),r}(c.PureComponent)},40303:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Q});var o=r(5544),i=r(9950),n=r(10467),a=r(54756),c=r.n(a),l=r(32988),s=r(39886),d=r(52816),u=r(51178),h=r(37090),f=r(16673),p=r(46675),m=r(69994),y=r(73878),b=r(69194),g=r(5339),v=r(20564),x=r(77911),S=r(32507),A=r(44414),C=(0,m.A)(function(e){return{header:{"& p":{fontSize:13,color:"#00001e",marginTop:6},"& a":{cursor:"pointer",fontSize:13}},back:{cursor:"pointer",padding:e.spacing(2,2,2,0),color:e.palette.grey[500]},flex:{display:"flex"}}});const w=function(e){var t=e.refresh,r=(0,p.A)(),a=(0,f.W6)(),m=(0,f.zy)(),w=Number(m.pathname.split("/").pop()),j=C(),k=(0,y.d4)(function(e){return e.site.siteOptions}),_=(0,i.useState)("Site"),M=(0,o.A)(_,2),L=M[0],I=M[1],W=(0,i.useState)(void 0),O=(0,o.A)(W,2),Y=O[0],N=O[1],z=(0,i.useState)(!1),E=(0,o.A)(z,2),R=E[0],D=E[1];function B(){return(B=(0,n.A)(c().mark(function e(){var t;return c().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,(0,v.O6)({site_ids:[w].join(",")});case 3:t=e.sent,N(t),D(!0),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(0),(0,S.u)(e.t0);case 11:case"end":return e.stop()}},e,null,[[0,8]])}))).apply(this,arguments)}return(0,i.useEffect)(function(){var e;if(k&&k.length){var t=m.pathname.split("/").pop();if(t){(0,g.PS)({site_id:Number(t)});var r=(null===(e=k.find(function(e){return e.id===Number(t)}))||void 0===e?void 0:e.name)||"Site";return I(r),function(){(0,g.PS)({site_id:void 0})}}}},[m,k]),(0,A.jsxs)(b.A,{title:"",children:[(0,A.jsxs)(l.A,{container:!0,className:j.header,justifyContent:"space-between",alignItems:"center",children:[(0,A.jsxs)(l.A,{item:!0,alignItems:"center",className:j.flex,children:[(0,A.jsx)(u.A,{className:j.back,onClick:function(){a.push("/devices/occupancy/")}
1}),(0,A.jsx)(s.A,{variant:"h6",children:L})]}),(0,A.jsx)(l.A,{item:!0,children:(0,A.jsx)(d.A,{variant:"outlined",color:"primary",startIcon:(0,A.jsx)(h.A,{}),onClick:function(){return B.apply(this,arguments)},children:r.formatMessage({id:"occupancy.edit"})})})]}),R&&(0,A.jsx)(x.A,{siteId:w,occupancy:Y,onClose:function(){N(void 0),D(!1)},refresh:function(){D(!1),t&&t()}})]})};var j=r(96461),k=(0,m.A)(function(e){return{left:{padding:"".concat(e.spacing(2),"px ").concat(e.spacing(4),"px"),backgroundColor:"#fafafa",borderRadius:e.spacing(1),marginRight:e.spacing(2)},right:{padding:"".concat(e.spacing(2),"px ").concat(e.spacing(4),"px"),textAlign:"center",backgroundColor:e.palette.primary.main,color:"white",borderRadius:e.spacing(1)},number:{fontSize:48,marginBottom:0,lineHeight:1.17},title:{fontWeight:500,letterSpacing:.1},icon:{width:28,paddingLeft:6,paddingRight:6,marginRight:10}}});const _=function(){var e=k(),t=(0,y.d4)(function(e){return e.occupancy.occupancyNow}),r=(0,p.A)();return(0,A.jsxs)("div",{children:[(0,A.jsxs)(l.A,{container:!0,alignItems:"center",style:{marginTop:12,marginBottom:8},children:[(0,A.jsx)(j.h,{className:e.icon}),(0,A.jsx)(s.A,{variant:"h6",color:"textSecondary",children:r.formatMessage({id:"occupancy.live"})})]}),(0,A.jsxs)(l.A,{container:!0,children:[(0,A.jsxs)(l.A,{className:e.left,item:!0,children:[(0,A.jsx)(s.A,{className:e.title,gutterBottom:!0,children:r.formatMessage({id:"occupancy.title"})}),(0,A.jsxs)(s.A,{children:[(0,A.jsx)("span",{className:e.number,children:t.num_occupancy}),(0,A.jsxs)("span",{style:{fontSize:24,color:"#3C5BFF"},children:[" / ",t.num_capacity]})]})]}),(0,A.jsxs)(l.A,{className:e.right,item:!0,style:{backgroundColor:t.num_occupancy>t.num_capacity?"#f88078":"#3C5BFF"},children:[(0,A.jsx)(s.A,{className:e.title,gutterBottom:!0,children:r.formatMessage({id:"occupancy.capancity"})}),(0,A.jsxs)(s.A,{children:[(0,A.jsx)("span",{className:e.number,children:0===t.num_capacity?"--":(t.num_occupancy/t.num_capacity*100).toFixed(1)}),(0,A.jsx)("span",{style:{fontSize:34},children:"%"})]})]})]})]})};var M=r(89379),L=r(59051),I=r.n(L),W=r(95888),O=r(55510),Y=r(97226),N=r(11881),z=r(60695),E=r(68411),R=r(59428),D=r(93623),B=r(70382),P=r(5143),T=(0,m.A)(function(){return{textField:{cursor:"pointer","&::before":{border:"0 !important",content:""},"&::after":{border:"0 !important",content:""}}}});const F=function(e){var t=T();return(0,A.jsx)(D.M,{utils:E.A,children:(0,A.jsx)(B.l,(0,M.A)({InputProps:{className:t.textField,style:{width:150,cursor:"pointer",textAlign:"center",borderBottom:"none",color:"#3c5bff"},startAdornment:(0,A.jsx)(R.A,{position:"start",children:(0,A.jsx)("img",{src:P.A,style:{height:"16px"},alt:"icon"})})}},e))})};var H=r(24093),Z=(r(25045),r(89444),function(e){return e.format("YYYYMMDD")>I()().format("YYYYMMDD")});var G=(0,m.A)(function(e){return{root:{padding:e.spacing(3),marginTop:e.spacing(2),marginBottom:e.spacing(4)},divider:{margin:"0 ".concat(e.spacing(2),"px")},title:{color:"grey"},textField:{cursor:"pointer","& div::before":{border:"0 !important",content:""},"& div::after":{border:"0 !important",content:""}}}}),J={grid:{top:30,left:30,right:20,bottom:20,containLabel:!0},xAxis:{type:"category",boundaryGap:!1,data:[]},yAxis:{type:"value",minInterval:1},series:[{data:[],type:"line",markLine:{data:[]},lineStyle:{color:"#5a96e0"}}],tooltip:{trigger:"axis",padding:0,border:0,formatter:function(e){if(e&&e.length>0){var t=e[0].data,r=t.num_occupancy,o=t.num_capacity,i=t.ended_at,n=i?I()(i).format("h:mm A"):"--",a=r>0?Math.round(100*r/o)+"%":"--";return'\n          <div style="font-size: 12px; padding: 4px 10px; text-align: center;line-height: 18px;">\n            <div>'.concat(n,"</div>\n            <div>").concat(r," ").concat(r>1?"people":"person","</div>\n            <div>").concat(a," Capacity</div>\n          </div>\n        ")}return null}}};function U(e,t){var r=I()(e.ended_at).unix(),o=I()(t.time_after).unix();return Math.floor((r-o)/300)}const X=function(e){var t=e.changed,r=(0,y.wA)(),n=G(),a=(0,p.A)(),c=Number(location.pathname.split("/").pop());if(!c)return null;var d=(0,y.d4)(function(e){return e.occupancy}),u=d.siteOccupancyList,h=d.siteOccupancyFilter,f=(0,i.useState)(I().utc().local()),m=(0,o.A)(f,2),b=m[0],v=m[1],x=(0,i.useState)(!1),S=(0,o.A)(x,2),C=S[0],w=S[1],j=(0,i.useState)(J),k=(0,o.A)(j,2),_=k[0],L=k[1];(0,i.useEffect)(function(){!function(){var e=u.sort(function(e,t){return e.started_at>t.started_at?1:-1}),t=e.map(function(e){return(0,M.A)({tag:U(e,h)},e)}).reduce(function(e,t,r){var o=t.num_enter-t.num_exit,i=Math.max(0,o);return e[t.tag]=(0,M.A)((0,M.A)({},t),{},{num_occupancy:i}),r===u.length-1&&(0,g.wX)({num_occupancy:i,num_capacity:t.num_capacity}),e},{}),r=e.length>0?U(e[e.length-1],h):null,o=Array(288).fill(0).map(function(e,r){var o,i=t[r]?t[r].num_occupancy:0,n=t[r]?t[r].num_capacity:0,a=t[r]?t[r].ended_at:null;return{hour_tag:(o=Math.floor(r/12),0===o?"12 AM":12===o?"12 PM":o>12?"".concat(o-12," PM"):"".concat(o," AM")),num_occupancy:i,num_capacity:n,ended_at:a}}),i=I()().format("YYYY-MM-DD")===b.format("YYYY-MM-DD"),n=o.map(function(e){return e.hour_tag}),c=o.map(function(e){return(0,M.A)({value:e.num_occupancy},e)}).slice(0,i&&r?r+1:289),l={data:i&&r?[{xAxis:r,label:{formatter:a.formatMessage({id:"occupancy.chart.label.now"})},lineStyle:{color:"black",type:"solid"},symbol:"none",silent:!0}]:[]};L((0,M.A)((0,M.A)({},J),{},{xAxis:(0,M.A)((0,M.A)({},J.xAxis),{},{data:n}),series:[(0,M.A)((0,M.A)({},J.series[0]),{},{markLine:l,data:c})]}))}()},[u]),(0,i.useEffect)(function(){return function(){r((0,g.J8)())}},[]),(0,i.useEffect)(function(){b&&b.format("YYYYMMDD")>=I()().format("YYYYMMDD")?w(!0):w(!1)},[b]),(0,i.useEffect)(function(){(0,g.SI)(h)},[h]),(0,i.useEffect)(function(){void 0!==t&&(0,g.SI)(h)},[t]);var E,R=function(e){var t=b;t="last"===e?(null===b||void 0===b?void 0:b.clone().subtract(1,"days"))||null:(null===b||void 0===b?void 0:b.clone().add(1,"days"))||null,v(t);var r={time_after:t.clone().startOf("day").toISOString(),time_before:t.clone().endOf("day").toISOString(),site_id:c};(0,g.PS)(r)};return(0,A.jsxs)(W.A,{className:n.root,children:[(0,A.jsx)(l.A,{container:!0,children:(0,A.jsxs)(l.A,{container:!0,xs:!0,item:!0,children:[(0,A.jsx)(s.A,{variant:"h6",color:"textSecondary",children:a.formatMessage({id:"occupancy.title"})}),(0,A.jsx)(O.A,{className:n.divider,flexItem:!0,orientation:"vertical"}),(0,A.jsxs)(l.A,{item:!0,xs:!0,container:!0,alignItems:"baseline",children:[(0,A.jsx)(F,{value:b,onChange:(E="date",function(e){var t=e&&e.target?e.target.value:e;if("date"===E){v(t);var r={time_after:t.clone().startOf("day").toISOString(),time_before:t.clone().endOf("day").toISOString(),site_id:c};(0,g.PS)(r)}}),shouldDisableDate:Z}),(0,A.jsx)(Y.A,{style:{height:"16px",margin:"-8px"},onClick:function(){return R("last")},children:(0,A.jsx)(N.A,{fontSize:"small",color:"inherit"})}),(0,A.jsx)(Y.A,{style:{height:"16px",margin:"-8px"},onClick:function(){return R("next")},disabled:C,children:(0,A.jsx)(z.A,{fontSize:"small"})})]})]})}),(0,A.jsx)(l.A,{style:{position:"relative",minHeight:420},children:(0,A.jsx)(H.A,{options:_,style:{position:"absolute",height:"100%",width:"100%"}})})]})};var q=r(90716),K=r(30835);const Q=function(){var e=(0,i.useState)(void 0),t=(0,o.A)(e,2),r=t[0],n=t[1];return(0,i.useEffect)(function(){(0,K.Gr)()},[]),(0,A.jsxs)("div",{children:[(0,A.jsx)(w,{refresh:function(){n(!r)}}),(0,A.jsxs)(q.A,{children:[(0,A.jsx)(_,{}),(0,A.jsx)(X,{changed:r})]})]})}},95888:(e,t,r)=>{r.d(t,{A:()=>d});var o=r(58168),i=r(80045),n=r(9950),a=r(2803),c=r(77882),l=r(64620),s=n.forwardRef(function(e,t){var r=e.classes,l=e.className,s=e.raised,d=void 0!==s&&s,u=(0,i.A)(e,["classes","className","raised"]);return n.createElement(c.A,(0,o.A)({className:(0,a.A)(r.root,l),elevation:d?8:1,ref:t},u))});const d=(0,l.A)({root:{overflow:"hidden"}},{name:"MuiCard"})(s)}}]);

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.