react-ui-mat
Version:
- ANIMATE - BADGES ( success, danger, info, light, primary, green ) - BEHAVIOR - BUTTONS - CHECKBOX - COLLAPSE - CONTEXT PANEL - DATE PICKER - DATEPICKER - DATEUTIL - DIVIDER - DRAGABLE MODAL - INCORRECT_ENTRY - INPUT - INPUT_FIELDS - MULTISELECT - MUPLAY
1 lines • 15.1 kB
JavaScript
;var a0_0x1d1557=this&&this['__importDefault']||function(_0x23ab79){return _0x23ab79&&_0x23ab79['__esModule']?_0x23ab79:{'default':_0x23ab79};};const a0_0x5103ab={};a0_0x5103ab['value']=!![],Object['defineProperty'](exports,'__esModule',a0_0x5103ab),exports['MKPlayer']=void 0x0;const a0_0x2f906b=require('react/jsx-runtime'),a0_0x1d8130=a0_0x1d1557(require('react')),a0_0x4aabc1=require('./DateUtil'),a0_0x95dd81=require('./logger'),a0_0x38e1ca={};a0_0x38e1ca['1']=0x1,a0_0x38e1ca['2']=0x2,a0_0x38e1ca['3']=0x3,a0_0x38e1ca['5']=0x5,a0_0x38e1ca['10']=0xa,a0_0x38e1ca['25']=0x19;const a0_0x68802a=a0_0x38e1ca,a0_0x155f97={};a0_0x155f97['-1']=-0x1,a0_0x155f97['5']=0x5,a0_0x155f97['10']=0xa,a0_0x155f97['15']=0xf,a0_0x155f97['25']=0x19,a0_0x155f97['50']=0x32,a0_0x155f97['100']=0x64;const a0_0x283281=a0_0x155f97;function a0_0x1ef581(_0x3dfdf2,_0x33e135,_0x64d0e9,_0x17d685){const _0x4dff3d=_0x64d0e9-_0x3dfdf2,_0x4a6bfe=_0x17d685-_0x33e135,_0x2e2428=Math['atan'](_0x4dff3d/_0x4a6bfe);let _0x14fb39=_0x2e2428*0xb4/Math['PI'];return _0x14fb39=0xb4-_0x14fb39,(_0x4dff3d>0x0&&_0x4a6bfe>0x0||_0x4dff3d<0x0&&_0x4a6bfe>0x0)&&(_0x14fb39=_0x14fb39+0xb4),_0x14fb39=_0x14fb39+0x5a,_0x14fb39;}function a0_0x15c8e5({..._0x1fb51f}){const _0x29adef=Number(a0_0x283281[_0x1fb51f['trackSize']])||0x5,_0x3b1733=_0x29adef<0x0,_0x3d6efa=a0_0x1d8130['default']['useRef'](0x0),_0x2431c7=a0_0x1d8130['default']['useRef'](0x1),_0x4c6a77=a0_0x1d8130['default']['useRef'](0x0),_0x4acd67=a0_0x1d8130['default']['useRef']({}),_0x546231=a0_0x1d8130['default']['useRef']([]),_0x578bd6=a0_0x1d8130['default']['useRef'](0x0),_0x5e376c=a0_0x1d8130['default']['useRef'](-0x1),_0x3e7c17=a0_0x1d8130['default']['useRef'](null),_0xc49f82=a0_0x1d8130['default']['useRef'](null),_0x13fe6f=a0_0x1d8130['default']['useRef'](null),_0x12fc1a=a0_0x1d8130['default']['useRef'](null),_0x31e7a4=a0_0x1d8130['default']['useRef'](null),_0x230348=a0_0x1d8130['default']['useRef'](null),_0x3d2897=a0_0x1d8130['default']['useRef'](null),_0x55e046=a0_0x1d8130['default']['useRef'](null),_0x352f02=a0_0x1d8130['default']['useState'](),_0x2ef1ca=a0_0x1d8130['default']['useRef'](-0x1);function _0x526165(){_0x352f02[0x1](new Date()['getTime']());}function _0x586fc4(){const _0x24f2a4=_0x12fc1a['current']['getBoundingClientRect'](),_0x4d6da0=_0x24f2a4['width'],_0x4bd79b=_0x24f2a4['height'],_0x4941ee=Number(_0x12fc1a['current']['value']),_0x319167=Number(_0x12fc1a['current']['max']),_0x11fb06=Number(_0x12fc1a['current']['min']),_0x3a48e4=_0x24f2a4['left']+_0x4d6da0*(_0x4941ee-_0x11fb06)/(_0x319167-_0x11fb06),_0x57564e=0x19,_0x34fd94=0x19,_0x1c076a=_0x3a48e4+_0x57564e/0x2,_0x2b52bf=_0x24f2a4['top']+_0x4bd79b/0x2,_0xb678c2={};return _0xb678c2['thumbCenterX']=_0x1c076a,_0xb678c2['thumbCenterY']=_0x2b52bf,_0xb678c2;}function _0x262f4d(){const _0xfcaec8=_0x586fc4();_0x31e7a4['current']['style']['position']='absolute',_0x31e7a4['current']['style']['left']=_0xfcaec8['thumbCenterX']+'px',_0x31e7a4['current']['style']['top']=_0xfcaec8['thumbCenterY']+'px',_0x31e7a4['current']['style']['transform']='translateX(-50%)',_0x31e7a4['current']['innerText']=_0xc49f82['current']['innerText'];}function _0x305629(){_0x578bd6['current']=0x0,_0x5e376c['current']=-0x1,_0x2ef1ca['current']=-0x1,_0x12fc1a['current']['value']='0',_0x4acd67['current']={};let _0x24a8a3,_0x92072e;try{_0x24a8a3=a0_0x4aabc1['DateUtil']['new']()['setDateInputValue'](_0x1fb51f['startDate']),_0x92072e=a0_0x4aabc1['DateUtil']['new']()['setDateInputValue'](_0x1fb51f['endDate']);const _0x5458eb=a0_0x4aabc1['DateUtil']['diffSecs'](_0x1fb51f['startDate'],_0x1fb51f['endDate'],!![]),_0x4244d2=[],_0x3fe4da=[],_0x4b3d06=[];_0x1fb51f['data']?.['orders']?.['sfEach'](_0x559c39=>{const _0x95b9f2=_0x559c39['actionsHistory'][0x0]['time'];let _0x4bce5b=_0x559c39['actionsHistory'][0x0]['time'];for(let _0x51429b=0x0;_0x51429b<_0x559c39['actionsHistory']?.['length'];_0x51429b++){const _0x2d199a=_0x559c39['actionsHistory'][_0x51429b],_0x25ed2c={..._0x559c39,..._0x2d199a};_0x25ed2c['preTime']=_0x4bce5b,_0x25ed2c['submitDate']=_0x95b9f2;const _0x2f2a30=_0x25ed2c;!(_0x2d199a['status']==='CANCELLED'||_0x2d199a['status']==='DELIVERY_FAILED')&&_0x4244d2['push'](_0x2f2a30);_0x4bce5b=_0x2f2a30['time'];if(_0x2d199a['status']==='DELIVERED'||_0x2d199a['status']==='CANCELLED'||_0x2d199a['status']==='DELIVERY_FAILED')break;}}),_0x1fb51f['data']?.['drivers']?.['sfEach'](_0xffa31a=>{if(_0xffa31a['actions']?.['length']){let _0x563d3e;_0xffa31a['actions']?.['sfEach']((_0x569acc,_0x5e9285)=>{_0x563d3e=_0x5e9285<_0xffa31a['actions']['length']-0x1?_0xffa31a['actions'][_0x5e9285+0x1]['time']:_0x92072e['toIsoDate']();const _0x17d612={};_0x17d612['driverId']=_0xffa31a['id'],_0x17d612['firstName']=_0xffa31a['firstName'],_0x17d612['lastName']=_0xffa31a['lastName'],_0x17d612['storeChainId']=_0x569acc['storeChainId'],_0x17d612['storeChainName']=_0x569acc['storeChainName'],_0x17d612['driverActionType']=_0x569acc['driverActionType'],_0x17d612['toTime']=_0x563d3e,_0x17d612['time']=_0x569acc['time'];const _0x10068d=_0x17d612;_0x3fe4da['push'](_0x10068d);});};if(_0xffa31a['locations']?.['length']){let _0x504c0c={},_0x337de6=_0xffa31a['locations'][0x0]['time'];_0xffa31a['locations']?.['sfEach']((_0x3cc2df,_0x4d3855)=>{const _0x53374d=a0_0x4aabc1['DateUtil']['new']()['setIsoDate'](_0x3cc2df['time'])['startOfSeconds'](),_0x3b60dd={'driverId':_0xffa31a['id'],'firstName':_0xffa31a['firstName'],'lastName':_0xffa31a['lastName'],'lat':_0x3cc2df['lat'],'lng':_0x3cc2df['lon'],'preTime':_0x337de6,'time':_0x53374d['toIsoDate']()};_0x504c0c[_0x53374d['toTime']()]=_0x3b60dd,_0x337de6=_0x3b60dd['time'];}),_0x4b3d06['push'](_0x504c0c);}});for(let _0x3302aa=0x0;_0x3302aa<_0x5458eb;_0x3302aa++){const _0x236fb4=_0x24a8a3['cpy']()['addSecs'](_0x3302aa)['startOfSeconds'](),_0x5b12e5=_0x4244d2['sfFilter'](_0x20a09=>_0x236fb4['cpy']()['btweq'](_0x20a09['preTime'],_0x20a09['time'])),_0xcbb2c8=_0x3fe4da['sfFilter'](_0x118cc3=>_0x236fb4['cpy']()['btweq'](_0x118cc3['time'],_0x118cc3['toTime'])),_0x17408b=[];_0x4b3d06['sfEach'](_0x775201=>{const _0x16b8a5=_0x775201[_0x236fb4['toTime']()];_0x16b8a5&&_0x17408b['push'](_0x16b8a5);});const _0xd6f8c2={};_0xd6f8c2['orders']=_0x5b12e5,_0xd6f8c2['locations']=_0x17408b,_0xd6f8c2['actions']=_0xcbb2c8,_0x4acd67['current'][_0x236fb4['toIsoDate']()]=_0xd6f8c2;}_0x578bd6['current']=_0x5458eb,_0x546231['current']=Object['keys'](_0x4acd67['current']);}catch(_0xc3986c){a0_0x95dd81['logger']['log']('UNKNOWN');}_0x3e7c17['current']['innerText']=_0x24a8a3?_0x24a8a3['strTime']():a0_0x4aabc1['DateUtil']['new']()['startOfDay']()['strTime'](),_0xc49f82['current']['innerText']=_0x24a8a3['cpy']()['strTime'](),_0x13fe6f['current']['innerText']=_0x92072e?_0x92072e['strTime']():a0_0x4aabc1['DateUtil']['new']()['startOfDay']()['strTime'](),_0x262f4d(),_0x526165();}function _0x437927(_0x1a9f1c,_0x498810){_0x5e376c['current']=_0x1a9f1c-0x1,_0x12fc1a['current']['value']=_0x1a9f1c-0x1,_0xc49f82['current']['innerText']=a0_0x4aabc1['DateUtil']['new']()['setDateInputValue'](_0x1fb51f['startDate'])['addSecs'](_0x1a9f1c)['strTime']();const _0x4cd753=Number(_0x12fc1a['current']['value'])/Number(_0x12fc1a['current']['max'])*0x64;_0x12fc1a['current']['style']['background']='linear-gradient(to\x20right,\x20#f50\x20'+_0x4cd753+'%,\x20#ccc\x20'+_0x4cd753+'%)';}function _0x5e4e21(_0x174fe5,_0x94af4,_0x3f08b2){const _0x32b943=_0x4acd67['current'][_0x174fe5];_0x1fb51f['onMove'](_0x32b943['orders'],_0x32b943['actions'],_0x32b943['locations']);}function _0x36ab90(_0x19a490){try{if(_0x5e376c['current']>=_0x578bd6['current']-0x1){_0x3d6efa['current']=0x0,_0x526165();return;}const _0x494633=_0x5e376c['current']+0x1;let _0x534871=_0x5e376c['current']<0x0?0x1:_0x5e376c['current']+0x1+_0x19a490;_0x534871=_0x534871>_0x578bd6['current']-0x1?_0x578bd6['current']:_0x534871;const _0x447290=_0x2ef1ca['current'];_0x534871-_0x2ef1ca['current']>=_0x29adef&&(_0x2ef1ca['current']=_0x534871-_0x29adef);const _0x1f6e86=_0x546231['current']['slice'](_0x494633,_0x534871),_0x24448f=_0x546231['current']['slice'](_0x447290,_0x2ef1ca['current']);_0x437927(_0x534871,_0x1f6e86[0x0]),_0x5e4e21(_0x1f6e86[_0x1f6e86['length']-0x1],_0x1f6e86,_0x24448f),_0x262f4d();}catch(_0x5531f2){a0_0x95dd81['logger']['log']('UNKNOWN',_0x5531f2);}}function _0x11950c(){_0x3d6efa['current']=0x0,_0x12fc1a['current']['value']='0',_0x305629(),_0x526165();}function _0x3f0d66(){_0x3d6efa['current']=0x1,_0x5e376c['current']>=_0x578bd6['current']-0x1&&(_0x5e376c['current']=-0x1),_0x5e376c['current']<0x0&&(_0x2ef1ca['current']=0x0,_0x1fb51f['onStartReplay']()),_0x526165();}function _0x28fb83(){_0x3d6efa['current']=0x2,_0x526165();}function _0x512912(_0x1fc1ff){_0x2431c7['current']=Number(a0_0x68802a[_0x1fc1ff['target']['value']])||0x1,_0x526165();}function _0x4485a7(){_0x4c6a77['current']=0x1,Boolean(window)&&clearTimeout(_0x3d2897['current']),_0x526165();}function _0x1efc0f(){Boolean(window)&&(_0x3d2897['current']=setTimeout(()=>{_0x4c6a77['current']=0x0,clearTimeout(_0x3d2897['current']);},0x1f4)),_0x526165();}function _0x2de8bf(_0x68ac1){try{_0x4485a7(),_0x12fc1a['current']['value']=_0x68ac1['target']['value'],Boolean(window)&&(clearTimeout(_0x230348['current']),_0x230348['current']=setTimeout(()=>{const _0x4143ae=Number(_0x12fc1a['current']['value']),_0x5c76cc=_0x546231['current'],_0x1b783c=_0x5c76cc[_0x4143ae],_0x2e0ce9=_0x4143ae;let _0x277df5=[],_0x10894d=[];if(_0x3b1733)_0x4143ae>_0x5e376c['current']&&(_0x277df5=_0x5c76cc['slice'](_0x5e376c['current']+0x1,_0x2e0ce9)),_0x4143ae<_0x5e376c['current']&&(_0x10894d=_0x5c76cc['slice'](_0x2e0ce9,_0x5e376c['current']+0x1));else{const _0x142c0e=_0x5e43ec=>_0x5e43ec<0x0?0x0:_0x5e43ec,_0x1e1e83=_0x142c0e(_0x2ef1ca['current']),_0x5b64e0=_0x142c0e(_0x5e376c['current']+0x1),_0x1985b4=_0x142c0e(_0x2e0ce9+0x1-_0x29adef),_0x17e131=_0x142c0e(_0x2e0ce9+0x1);_0x2ef1ca['current']=_0x1985b4;if(_0x1e1e83<_0x1985b4&&_0x1985b4<_0x5b64e0)_0x277df5=_0x5c76cc['slice'](_0x5b64e0,_0x17e131),_0x10894d=_0x5c76cc['slice'](_0x1e1e83,_0x1985b4);else _0x1e1e83<_0x17e131&&_0x17e131<_0x5b64e0?(_0x277df5=_0x5c76cc['slice'](_0x1985b4,_0x1e1e83),_0x10894d=_0x5c76cc['slice'](_0x17e131,_0x5b64e0)):(_0x277df5=_0x5c76cc['slice'](_0x1985b4,_0x17e131),_0x10894d=_0x5c76cc['slice'](_0x1e1e83,_0x5b64e0));_0x2ef1ca['current']=_0x1985b4;}_0x5e4e21(_0x1b783c,_0x277df5,_0x10894d),_0x437927(_0x4143ae+0x1,_0x1b783c);},0x1f4));}catch(_0x293eab){a0_0x95dd81['logger']['log']('UNKNOWN');}}a0_0x1d8130['default']['useEffect'](()=>{_0x11950c();},[_0x1fb51f['updateTime'],_0x29adef]),a0_0x1d8130['default']['useEffect'](()=>{return clearInterval(_0x55e046['current']),_0x55e046['current']=setInterval(()=>{_0x3d6efa['current']===0x1&&!_0x4c6a77['current']&&_0x578bd6['current']&&_0x36ab90(0x1);},Math['floor'](0x3e8/_0x2431c7['current'])),()=>{clearInterval(_0x55e046['current']);};},[_0x2431c7['current']]);const _0x2aa349={};_0x2aa349['width']='100%',_0x2aa349['height']='100%',_0x2aa349['display']='flex',_0x2aa349['flexDirection']='column';const _0x2d6088={};_0x2d6088['width']='100%',_0x2d6088['height']='100%',_0x2d6088['position']='relative';const _0xb668a1={};_0xb668a1['style']=_0x2d6088,_0xb668a1['children']=_0x1fb51f['children'];const _0x7d5014={};_0x7d5014['width']='100%',_0x7d5014['display']='flex',_0x7d5014['flexDirection']='column',_0x7d5014['position']='relative';const _0x55a878={};_0x55a878['type']='range',_0x55a878['className']='muplayer-range-input',_0x55a878['ref']=_0x12fc1a,_0x55a878['min']=0x0,_0x55a878['max']=_0x578bd6['current']-0x1,_0x55a878['onMouseDown']=_0x4485a7,_0x55a878['onMouseUp']=_0x1efc0f,_0x55a878['onBlur']=_0x1efc0f,_0x55a878['onChange']=_0x2de8bf,_0x55a878['onTouchStart']=_0x4485a7,_0x55a878['onTouchCancel']=_0x1efc0f;const _0x1b0e36={};_0x1b0e36['ref']=_0x31e7a4;const _0x6a07a2={};_0x6a07a2['width']='100%',_0x6a07a2['display']='flex',_0x6a07a2['flexDirection']='row',_0x6a07a2['alignItems']='center',_0x6a07a2['gap']='0.25rem';const _0x2be489={};_0x2be489['className']='mt-mutbnc',_0x2be489['disabled']=_0x3d6efa['current']===0x1||!_0x578bd6['current'],_0x2be489['onClick']=_0x3f0d66,_0x2be489['children']='▶';const _0x34d22e={};_0x34d22e['className']='mt-mutbnc',_0x34d22e['disabled']=_0x3d6efa['current']===0x0||_0x3d6efa['current']===0x2,_0x34d22e['onClick']=_0x28fb83,_0x34d22e['children']='⏸';const _0x3d351c={};_0x3d351c['className']='mt-mutbnc',_0x3d351c['disabled']=_0x3d6efa['current']===0x0,_0x3d351c['onClick']=_0x11950c,_0x3d351c['children']='⏹︎';const _0x45fd04={};_0x45fd04['width']='100%',_0x45fd04['display']='flex',_0x45fd04['flexDirection']='row',_0x45fd04['alignItems']='center',_0x45fd04['justifyContent']='space-between',_0x45fd04['flexWrap']='wrap',_0x45fd04['gap']='0.5rem',_0x45fd04['fontSize']='0.875rem',_0x45fd04['lineHeight']='1.25rem';const _0x3c2f4c={};_0x3c2f4c['display']='flex',_0x3c2f4c['flexDirection']='row',_0x3c2f4c['alignItems']='center',_0x3c2f4c['gap']='0.25rem';const _0x4d4e9b={};_0x4d4e9b['fontWeight']='500';const _0x3b54cc={};_0x3b54cc['ref']=_0xc49f82,_0x3b54cc['style']=_0x4d4e9b,_0x3b54cc['children']='00:00:00';const _0x4752f2={};_0x4752f2['children']='-';const _0x5d6f3b={};_0x5d6f3b['ref']=_0x3e7c17,_0x5d6f3b['children']='00:00:00';const _0x431d7e={};_0x431d7e['children']='-';const _0x23b386={};_0x23b386['ref']=_0x13fe6f,_0x23b386['children']='00:10:00';const _0x5575e1={};_0x5575e1['width']='5rem',_0x5575e1['minHeight']=0x21,_0x5575e1['height']=0x21;const _0x2c765c={};_0x2c765c['value']=0x1,_0x2c765c['children']='x1';const _0x50c0bb={};_0x50c0bb['value']=0x2,_0x50c0bb['children']='x2';const _0x10daeb={};_0x10daeb['value']=0x3,_0x10daeb['children']='x3';const _0x4555c1={};_0x4555c1['value']=0x5,_0x4555c1['children']='x5';const _0x4364f2={};_0x4364f2['value']=0xa,_0x4364f2['children']='10X';const _0x26f1cf={};return _0x26f1cf['value']=0x19,_0x26f1cf['children']='15X',(0x0,a0_0x2f906b['jsxs'])('div',{'style':_0x2aa349,'children':[(0x0,a0_0x2f906b['jsx'])('div',_0xb668a1),(0x0,a0_0x2f906b['jsxs'])('div',{'style':_0x7d5014,'children':[(0x0,a0_0x2f906b['jsx'])('input',_0x55a878),(0x0,a0_0x2f906b['jsx'])('span',_0x1b0e36),(0x0,a0_0x2f906b['jsxs'])('div',{'style':_0x6a07a2,'children':[(0x0,a0_0x2f906b['jsx'])('button',_0x2be489),(0x0,a0_0x2f906b['jsx'])('button',_0x34d22e),(0x0,a0_0x2f906b['jsx'])('button',_0x3d351c),(0x0,a0_0x2f906b['jsx'])('div',{'style':_0x45fd04,'children':(0x0,a0_0x2f906b['jsxs'])('div',{'style':_0x3c2f4c,'children':[(0x0,a0_0x2f906b['jsx'])('div',_0x3b54cc),(0x0,a0_0x2f906b['jsx'])('div',_0x4752f2),'[',(0x0,a0_0x2f906b['jsx'])('div',_0x5d6f3b),(0x0,a0_0x2f906b['jsx'])('div',_0x431d7e),(0x0,a0_0x2f906b['jsx'])('div',_0x23b386),']']})}),(0x0,a0_0x2f906b['jsxs'])('select',{'style':_0x5575e1,'value':_0x2431c7['current'],'onChange':_0x512912,'children':[(0x0,a0_0x2f906b['jsx'])('option',_0x2c765c),(0x0,a0_0x2f906b['jsx'])('option',_0x50c0bb),(0x0,a0_0x2f906b['jsx'])('option',_0x10daeb),(0x0,a0_0x2f906b['jsx'])('option',_0x4555c1),(0x0,a0_0x2f906b['jsx'])('option',_0x4364f2),(0x0,a0_0x2f906b['jsx'])('option',_0x26f1cf)]})]})]})]});}function a0_0xf41c98(_0x2e18ad){return a0_0x15c8e5(_0x2e18ad);}exports['MKPlayer']=a0_0xf41c98;