dcim-topology2d 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- package/activity-diagram/index.d.ts +5 -0
- package/activity-diagram/index.js +6 -0
- package/activity-diagram/index.js.map +1 -0
- package/activity-diagram/src/final/final.d.ts +2 -0
- package/activity-diagram/src/final/final.js +10 -0
- package/activity-diagram/src/final/final.js.map +1 -0
- package/activity-diagram/src/final/final.rect.d.ts +3 -0
- package/activity-diagram/src/final/final.rect.js +11 -0
- package/activity-diagram/src/final/final.rect.js.map +1 -0
- package/activity-diagram/src/final/index.d.ts +2 -0
- package/activity-diagram/src/final/index.js +3 -0
- package/activity-diagram/src/final/index.js.map +1 -0
- package/activity-diagram/src/fork/fork.anchor.d.ts +3 -0
- package/activity-diagram/src/fork/fork.anchor.js +28 -0
- package/activity-diagram/src/fork/fork.anchor.js.map +1 -0
- package/activity-diagram/src/fork/fork.d.ts +2 -0
- package/activity-diagram/src/fork/fork.js +25 -0
- package/activity-diagram/src/fork/fork.js.map +1 -0
- package/activity-diagram/src/fork/fork.rect.d.ts +3 -0
- package/activity-diagram/src/fork/fork.rect.js +9 -0
- package/activity-diagram/src/fork/fork.rect.js.map +1 -0
- package/activity-diagram/src/fork/index.d.ts +3 -0
- package/activity-diagram/src/fork/index.js +4 -0
- package/activity-diagram/src/fork/index.js.map +1 -0
- package/activity-diagram/src/register.d.ts +1 -0
- package/activity-diagram/src/register.js +13 -0
- package/activity-diagram/src/register.js.map +1 -0
- package/activity-diagram/src/swimlaneH/index.d.ts +2 -0
- package/activity-diagram/src/swimlaneH/index.js +3 -0
- package/activity-diagram/src/swimlaneH/index.js.map +1 -0
- package/activity-diagram/src/swimlaneH/swimlaneH.d.ts +2 -0
- package/activity-diagram/src/swimlaneH/swimlaneH.js +27 -0
- package/activity-diagram/src/swimlaneH/swimlaneH.js.map +1 -0
- package/activity-diagram/src/swimlaneH/swimlaneH.rect.d.ts +3 -0
- package/activity-diagram/src/swimlaneH/swimlaneH.rect.js +9 -0
- package/activity-diagram/src/swimlaneH/swimlaneH.rect.js.map +1 -0
- package/activity-diagram/src/swimlaneV/index.d.ts +2 -0
- package/activity-diagram/src/swimlaneV/index.js +3 -0
- package/activity-diagram/src/swimlaneV/index.js.map +1 -0
- package/activity-diagram/src/swimlaneV/swimlaneV.d.ts +2 -0
- package/activity-diagram/src/swimlaneV/swimlaneV.js +27 -0
- package/activity-diagram/src/swimlaneV/swimlaneV.js.map +1 -0
- package/activity-diagram/src/swimlaneV/swimlaneV.rect.d.ts +3 -0
- package/activity-diagram/src/swimlaneV/swimlaneV.rect.js +9 -0
- package/activity-diagram/src/swimlaneV/swimlaneV.rect.js.map +1 -0
- package/chart-diagram/index.d.ts +3 -0
- package/chart-diagram/index.js +4 -0
- package/chart-diagram/index.js.map +1 -0
- package/chart-diagram/src/echarts/echarts.min.js +22 -0
- package/chart-diagram/src/echarts/index.d.ts +4 -0
- package/chart-diagram/src/echarts/index.js +104 -0
- package/chart-diagram/src/echarts/index.js.map +1 -0
- package/chart-diagram/src/register.d.ts +1 -0
- package/chart-diagram/src/register.js +12 -0
- package/chart-diagram/src/register.js.map +1 -0
- package/class-diagram/index.d.ts +2 -0
- package/class-diagram/index.js +3 -0
- package/class-diagram/index.js.map +1 -0
- package/class-diagram/src/class/class.d.ts +3 -0
- package/class-diagram/src/class/class.js +56 -0
- package/class-diagram/src/class/class.js.map +1 -0
- package/class-diagram/src/class/class.rect.d.ts +5 -0
- package/class-diagram/src/class/class.rect.js +16 -0
- package/class-diagram/src/class/class.rect.js.map +1 -0
- package/class-diagram/src/class/index.d.ts +2 -0
- package/class-diagram/src/class/index.js +3 -0
- package/class-diagram/src/class/index.js.map +1 -0
- package/class-diagram/src/register.d.ts +1 -0
- package/class-diagram/src/register.js +7 -0
- package/class-diagram/src/register.js.map +1 -0
- package/core/index.d.ts +8 -0
- package/core/index.js +26 -0
- package/core/index.js.map +1 -0
- package/core/src/activeLayer.d.ts +55 -0
- package/core/src/activeLayer.js +679 -0
- package/core/src/activeLayer.js.map +1 -0
- package/core/src/animateLayer.d.ts +23 -0
- package/core/src/animateLayer.js +227 -0
- package/core/src/animateLayer.js.map +1 -0
- package/core/src/calling.d.ts +37 -0
- package/core/src/calling.js +253 -0
- package/core/src/canvas.d.ts +19 -0
- package/core/src/canvas.js +81 -0
- package/core/src/canvas.js.map +1 -0
- package/core/src/common.d.ts +102 -0
- package/core/src/common.js +1254 -0
- package/core/src/core.d.ts +104 -0
- package/core/src/core.js +2281 -0
- package/core/src/core.js.map +1 -0
- package/core/src/divLayer.d.ts +61 -0
- package/core/src/divLayer.js +485 -0
- package/core/src/divLayer.js.map +1 -0
- package/core/src/healps/changeData.d.ts +8 -0
- package/core/src/healps/changeData.js +205 -0
- package/core/src/healps/index.d.ts +1 -0
- package/core/src/healps/index.js +1 -0
- package/core/src/hoverLayer.d.ts +32 -0
- package/core/src/hoverLayer.js +199 -0
- package/core/src/hoverLayer.js.map +1 -0
- package/core/src/layer.d.ts +5 -0
- package/core/src/layer.js +11 -0
- package/core/src/layer.js.map +1 -0
- package/core/src/middles/arrows/circle.d.ts +3 -0
- package/core/src/middles/arrows/circle.js +20 -0
- package/core/src/middles/arrows/circle.js.map +1 -0
- package/core/src/middles/arrows/diamond.d.ts +3 -0
- package/core/src/middles/arrows/diamond.js +28 -0
- package/core/src/middles/arrows/diamond.js.map +1 -0
- package/core/src/middles/arrows/line.d.ts +4 -0
- package/core/src/middles/arrows/line.js +42 -0
- package/core/src/middles/arrows/line.js.map +1 -0
- package/core/src/middles/arrows/triangle.d.ts +3 -0
- package/core/src/middles/arrows/triangle.js +25 -0
- package/core/src/middles/arrows/triangle.js.map +1 -0
- package/core/src/middles/default.anchor.d.ts +2 -0
- package/core/src/middles/default.anchor.js +9 -0
- package/core/src/middles/default.anchor.js.map +1 -0
- package/core/src/middles/default.d.ts +12 -0
- package/core/src/middles/default.js +257 -0
- package/core/src/middles/default.js.map +1 -0
- package/core/src/middles/default.rect.d.ts +3 -0
- package/core/src/middles/default.rect.js +19 -0
- package/core/src/middles/default.rect.js.map +1 -0
- package/core/src/middles/index.d.ts +3 -0
- package/core/src/middles/index.js +4 -0
- package/core/src/middles/index.js.map +1 -0
- package/core/src/middles/lines/curve.d.ts +10 -0
- package/core/src/middles/lines/curve.js +127 -0
- package/core/src/middles/lines/curve.js.map +1 -0
- package/core/src/middles/lines/line.d.ts +4 -0
- package/core/src/middles/lines/line.js +11 -0
- package/core/src/middles/lines/line.js.map +1 -0
- package/core/src/middles/lines/mind.d.ts +6 -0
- package/core/src/middles/lines/mind.js +90 -0
- package/core/src/middles/lines/mind.js.map +1 -0
- package/core/src/middles/lines/polyline.d.ts +7 -0
- package/core/src/middles/lines/polyline.js +309 -0
- package/core/src/middles/lines/polyline.js.map +1 -0
- package/core/src/middles/nodes/arbitrarygraph.anchor.d.ts +2 -0
- package/core/src/middles/nodes/arbitrarygraph.anchor.js +18 -0
- package/core/src/middles/nodes/arbitrarygraph.d.ts +2 -0
- package/core/src/middles/nodes/arbitrarygraph.js +17 -0
- package/core/src/middles/nodes/arrow.anchor.d.ts +2 -0
- package/core/src/middles/nodes/arrow.anchor.js +7 -0
- package/core/src/middles/nodes/arrow.anchor.js.map +1 -0
- package/core/src/middles/nodes/arrow.d.ts +4 -0
- package/core/src/middles/nodes/arrow.js +44 -0
- package/core/src/middles/nodes/arrow.js.map +1 -0
- package/core/src/middles/nodes/arrow.rect.d.ts +7 -0
- package/core/src/middles/nodes/arrow.rect.js +23 -0
- package/core/src/middles/nodes/arrow.rect.js.map +1 -0
- package/core/src/middles/nodes/circle.anchor.d.ts +2 -0
- package/core/src/middles/nodes/circle.anchor.js +18 -0
- package/core/src/middles/nodes/circle.anchor.js.map +1 -0
- package/core/src/middles/nodes/circle.d.ts +2 -0
- package/core/src/middles/nodes/circle.js +7 -0
- package/core/src/middles/nodes/circle.js.map +1 -0
- package/core/src/middles/nodes/circle.rect.d.ts +3 -0
- package/core/src/middles/nodes/circle.rect.js +27 -0
- package/core/src/middles/nodes/circle.rect.js.map +1 -0
- package/core/src/middles/nodes/cloud.anchor.d.ts +2 -0
- package/core/src/middles/nodes/cloud.anchor.js +9 -0
- package/core/src/middles/nodes/cloud.anchor.js.map +1 -0
- package/core/src/middles/nodes/cloud.d.ts +2 -0
- package/core/src/middles/nodes/cloud.js +11 -0
- package/core/src/middles/nodes/cloud.js.map +1 -0
- package/core/src/middles/nodes/cloud.rect.d.ts +3 -0
- package/core/src/middles/nodes/cloud.rect.js +9 -0
- package/core/src/middles/nodes/cloud.rect.js.map +1 -0
- package/core/src/middles/nodes/cube.anchor.d.ts +2 -0
- package/core/src/middles/nodes/cube.anchor.js +10 -0
- package/core/src/middles/nodes/cube.anchor.js.map +1 -0
- package/core/src/middles/nodes/cube.d.ts +2 -0
- package/core/src/middles/nodes/cube.js +5 -0
- package/core/src/middles/nodes/cube.js.map +1 -0
- package/core/src/middles/nodes/cube.model.d.ts +14 -0
- package/core/src/middles/nodes/cube.model.js +64 -0
- package/core/src/middles/nodes/cube.model.js.map +1 -0
- package/core/src/middles/nodes/cube.rect.d.ts +3 -0
- package/core/src/middles/nodes/cube.rect.js +11 -0
- package/core/src/middles/nodes/cube.rect.js.map +1 -0
- package/core/src/middles/nodes/diamond.d.ts +2 -0
- package/core/src/middles/nodes/diamond.js +11 -0
- package/core/src/middles/nodes/diamond.js.map +1 -0
- package/core/src/middles/nodes/diamond.rect.d.ts +3 -0
- package/core/src/middles/nodes/diamond.rect.js +27 -0
- package/core/src/middles/nodes/diamond.rect.js.map +1 -0
- package/core/src/middles/nodes/file.d.ts +2 -0
- package/core/src/middles/nodes/file.js +16 -0
- package/core/src/middles/nodes/file.js.map +1 -0
- package/core/src/middles/nodes/formtable.d.ts +2 -0
- package/core/src/middles/nodes/formtable.js +100 -0
- package/core/src/middles/nodes/hexagon.anchor.d.ts +2 -0
- package/core/src/middles/nodes/hexagon.anchor.js +21 -0
- package/core/src/middles/nodes/hexagon.anchor.js.map +1 -0
- package/core/src/middles/nodes/hexagon.d.ts +2 -0
- package/core/src/middles/nodes/hexagon.js +14 -0
- package/core/src/middles/nodes/hexagon.js.map +1 -0
- package/core/src/middles/nodes/hexagon.rect.d.ts +3 -0
- package/core/src/middles/nodes/hexagon.rect.js +14 -0
- package/core/src/middles/nodes/hexagon.rect.js.map +1 -0
- package/core/src/middles/nodes/image.anchor.d.ts +2 -0
- package/core/src/middles/nodes/image.anchor.js +12 -0
- package/core/src/middles/nodes/image.anchor.js.map +1 -0
- package/core/src/middles/nodes/image.rect.d.ts +3 -0
- package/core/src/middles/nodes/image.rect.js +65 -0
- package/core/src/middles/nodes/image.rect.js.map +1 -0
- package/core/src/middles/nodes/line.anchor.d.ts +2 -0
- package/core/src/middles/nodes/line.anchor.js +13 -0
- package/core/src/middles/nodes/line.anchor.js.map +1 -0
- package/core/src/middles/nodes/line.d.ts +2 -0
- package/core/src/middles/nodes/line.js +9 -0
- package/core/src/middles/nodes/line.js.map +1 -0
- package/core/src/middles/nodes/line.rect.d.ts +3 -0
- package/core/src/middles/nodes/line.rect.js +9 -0
- package/core/src/middles/nodes/line.rect.js.map +1 -0
- package/core/src/middles/nodes/message.anchor.d.ts +2 -0
- package/core/src/middles/nodes/message.anchor.js +9 -0
- package/core/src/middles/nodes/message.anchor.js.map +1 -0
- package/core/src/middles/nodes/message.d.ts +2 -0
- package/core/src/middles/nodes/message.js +14 -0
- package/core/src/middles/nodes/message.js.map +1 -0
- package/core/src/middles/nodes/message.rect.d.ts +3 -0
- package/core/src/middles/nodes/message.rect.js +10 -0
- package/core/src/middles/nodes/message.rect.js.map +1 -0
- package/core/src/middles/nodes/pentagon.anchor.d.ts +2 -0
- package/core/src/middles/nodes/pentagon.anchor.js +10 -0
- package/core/src/middles/nodes/pentagon.anchor.js.map +1 -0
- package/core/src/middles/nodes/pentagon.d.ts +2 -0
- package/core/src/middles/nodes/pentagon.js +12 -0
- package/core/src/middles/nodes/pentagon.js.map +1 -0
- package/core/src/middles/nodes/pentagon.rect.d.ts +3 -0
- package/core/src/middles/nodes/pentagon.rect.js +23 -0
- package/core/src/middles/nodes/pentagon.rect.js.map +1 -0
- package/core/src/middles/nodes/pentagram.anchor.d.ts +2 -0
- package/core/src/middles/nodes/pentagram.anchor.js +10 -0
- package/core/src/middles/nodes/pentagram.anchor.js.map +1 -0
- package/core/src/middles/nodes/pentagram.d.ts +2 -0
- package/core/src/middles/nodes/pentagram.js +11 -0
- package/core/src/middles/nodes/pentagram.js.map +1 -0
- package/core/src/middles/nodes/pentagram.rect.d.ts +3 -0
- package/core/src/middles/nodes/pentagram.rect.js +11 -0
- package/core/src/middles/nodes/pentagram.rect.js.map +1 -0
- package/core/src/middles/nodes/people.d.ts +2 -0
- package/core/src/middles/nodes/people.js +17 -0
- package/core/src/middles/nodes/people.js.map +1 -0
- package/core/src/middles/nodes/people.rect.d.ts +3 -0
- package/core/src/middles/nodes/people.rect.js +9 -0
- package/core/src/middles/nodes/people.rect.js.map +1 -0
- package/core/src/middles/nodes/rectangle.d.ts +2 -0
- package/core/src/middles/nodes/rectangle.js +25 -0
- package/core/src/middles/nodes/rectangle.js.map +1 -0
- package/core/src/middles/nodes/rectangle.rect.d.ts +3 -0
- package/core/src/middles/nodes/rectangle.rect.js +11 -0
- package/core/src/middles/nodes/rectangle.rect.js.map +1 -0
- package/core/src/middles/nodes/tablePagination.d.ts +2 -0
- package/core/src/middles/nodes/tablePagination.js +106 -0
- package/core/src/middles/nodes/text.d.ts +8 -0
- package/core/src/middles/nodes/text.js +295 -0
- package/core/src/middles/nodes/text.js.map +1 -0
- package/core/src/middles/nodes/triangle.anchor.d.ts +2 -0
- package/core/src/middles/nodes/triangle.anchor.js +9 -0
- package/core/src/middles/nodes/triangle.anchor.js.map +1 -0
- package/core/src/middles/nodes/triangle.d.ts +2 -0
- package/core/src/middles/nodes/triangle.js +10 -0
- package/core/src/middles/nodes/triangle.js.map +1 -0
- package/core/src/middles/nodes/triangle.rect.d.ts +3 -0
- package/core/src/middles/nodes/triangle.rect.js +23 -0
- package/core/src/middles/nodes/triangle.rect.js.map +1 -0
- package/core/src/models/data.d.ts +26 -0
- package/core/src/models/data.js +77 -0
- package/core/src/models/data.js.map +1 -0
- package/core/src/models/direction.d.ts +7 -0
- package/core/src/models/direction.js +9 -0
- package/core/src/models/direction.js.map +1 -0
- package/core/src/models/event.d.ts +13 -0
- package/core/src/models/event.js +16 -0
- package/core/src/models/event.js.map +1 -0
- package/core/src/models/index.d.ts +9 -0
- package/core/src/models/index.js +10 -0
- package/core/src/models/index.js.map +1 -0
- package/core/src/models/line.d.ts +53 -0
- package/core/src/models/line.js +442 -0
- package/core/src/models/line.js.map +1 -0
- package/core/src/models/node.d.ts +95 -0
- package/core/src/models/node.js +944 -0
- package/core/src/models/node.js.map +1 -0
- package/core/src/models/pen.d.ts +122 -0
- package/core/src/models/pen.js +362 -0
- package/core/src/models/pen.js.map +1 -0
- package/core/src/models/point.d.ts +25 -0
- package/core/src/models/point.js +59 -0
- package/core/src/models/point.js.map +1 -0
- package/core/src/models/rect.d.ts +22 -0
- package/core/src/models/rect.js +93 -0
- package/core/src/models/rect.js.map +1 -0
- package/core/src/models/status.d.ts +10 -0
- package/core/src/models/status.js +13 -0
- package/core/src/models/status.js.map +1 -0
- package/core/src/mqtt.d.ts +14 -0
- package/core/src/mqtt.js +82 -0
- package/core/src/mqtt.js.map +1 -0
- package/core/src/mqtt.min.d.ts +2 -0
- package/core/src/mqtt.min.js +2447 -0
- package/core/src/mqtt.min.js.map +1 -0
- package/core/src/offscreen.d.ts +16 -0
- package/core/src/offscreen.js +70 -0
- package/core/src/offscreen.js.map +1 -0
- package/core/src/options.d.ts +66 -0
- package/core/src/options.js +42 -0
- package/core/src/options.js.map +1 -0
- package/core/src/poll.js +39 -0
- package/core/src/preview.d.ts +29 -0
- package/core/src/preview.js +247 -0
- package/core/src/renderLayer.d.ts +36 -0
- package/core/src/renderLayer.js +187 -0
- package/core/src/renderLayer.js.map +1 -0
- package/core/src/socket.d.ts +10 -0
- package/core/src/socket.js +51 -0
- package/core/src/socket.js.map +1 -0
- package/core/src/utils/browser.d.ts +1 -0
- package/core/src/utils/browser.js +4 -0
- package/core/src/utils/browser.js.map +1 -0
- package/core/src/utils/canvas.d.ts +13 -0
- package/core/src/utils/canvas.js +84 -0
- package/core/src/utils/canvas.js.map +1 -0
- package/core/src/utils/construction.d.ts +41 -0
- package/core/src/utils/construction.js +36 -0
- package/core/src/utils/conversion.d.ts +0 -0
- package/core/src/utils/conversion.js +0 -0
- package/core/src/utils/dom.d.ts +8 -0
- package/core/src/utils/dom.js +67 -0
- package/core/src/utils/dom.js.map +1 -0
- package/core/src/utils/index.d.ts +9 -0
- package/core/src/utils/index.js +10 -0
- package/core/src/utils/index.js.map +1 -0
- package/core/src/utils/math.d.ts +3 -0
- package/core/src/utils/math.js +118 -0
- package/core/src/utils/math.js.map +1 -0
- package/core/src/utils/onmousevent.d.ts +5 -0
- package/core/src/utils/onmousevent.js +57 -0
- package/core/src/utils/padding.d.ts +7 -0
- package/core/src/utils/padding.js +47 -0
- package/core/src/utils/padding.js.map +1 -0
- package/core/src/utils/rect.d.ts +7 -0
- package/core/src/utils/rect.js +72 -0
- package/core/src/utils/rect.js.map +1 -0
- package/core/src/utils/uuid.d.ts +4 -0
- package/core/src/utils/uuid.js +13 -0
- package/core/src/utils/uuid.js.map +1 -0
- package/flow-diagram/index.d.ts +12 -0
- package/flow-diagram/index.js +13 -0
- package/flow-diagram/index.js.map +1 -0
- package/flow-diagram/src/comment/comment.anchor.d.ts +2 -0
- package/flow-diagram/src/comment/comment.anchor.js +5 -0
- package/flow-diagram/src/comment/comment.anchor.js.map +1 -0
- package/flow-diagram/src/comment/comment.d.ts +2 -0
- package/flow-diagram/src/comment/comment.js +10 -0
- package/flow-diagram/src/comment/comment.js.map +1 -0
- package/flow-diagram/src/comment/index.d.ts +2 -0
- package/flow-diagram/src/comment/index.js +3 -0
- package/flow-diagram/src/comment/index.js.map +1 -0
- package/flow-diagram/src/data/data.anchor.d.ts +2 -0
- package/flow-diagram/src/data/data.anchor.js +8 -0
- package/flow-diagram/src/data/data.anchor.js.map +1 -0
- package/flow-diagram/src/data/data.d.ts +2 -0
- package/flow-diagram/src/data/data.js +12 -0
- package/flow-diagram/src/data/data.js.map +1 -0
- package/flow-diagram/src/data/data.rect.d.ts +3 -0
- package/flow-diagram/src/data/data.rect.js +9 -0
- package/flow-diagram/src/data/data.rect.js.map +1 -0
- package/flow-diagram/src/data/index.d.ts +3 -0
- package/flow-diagram/src/data/index.js +4 -0
- package/flow-diagram/src/data/index.js.map +1 -0
- package/flow-diagram/src/db/db.d.ts +2 -0
- package/flow-diagram/src/db/db.js +14 -0
- package/flow-diagram/src/db/db.js.map +1 -0
- package/flow-diagram/src/db/db.rect.d.ts +4 -0
- package/flow-diagram/src/db/db.rect.js +9 -0
- package/flow-diagram/src/db/db.rect.js.map +1 -0
- package/flow-diagram/src/db/index.d.ts +2 -0
- package/flow-diagram/src/db/index.js +3 -0
- package/flow-diagram/src/db/index.js.map +1 -0
- package/flow-diagram/src/display/display.anchor.d.ts +2 -0
- package/flow-diagram/src/display/display.anchor.js +8 -0
- package/flow-diagram/src/display/display.anchor.js.map +1 -0
- package/flow-diagram/src/display/display.d.ts +2 -0
- package/flow-diagram/src/display/display.js +13 -0
- package/flow-diagram/src/display/display.js.map +1 -0
- package/flow-diagram/src/display/display.rect.d.ts +3 -0
- package/flow-diagram/src/display/display.rect.js +9 -0
- package/flow-diagram/src/display/display.rect.js.map +1 -0
- package/flow-diagram/src/display/index.d.ts +3 -0
- package/flow-diagram/src/display/index.js +4 -0
- package/flow-diagram/src/display/index.js.map +1 -0
- package/flow-diagram/src/document/document.anchor.d.ts +2 -0
- package/flow-diagram/src/document/document.anchor.js +8 -0
- package/flow-diagram/src/document/document.anchor.js.map +1 -0
- package/flow-diagram/src/document/document.d.ts +2 -0
- package/flow-diagram/src/document/document.js +15 -0
- package/flow-diagram/src/document/document.js.map +1 -0
- package/flow-diagram/src/document/document.rect.d.ts +3 -0
- package/flow-diagram/src/document/document.rect.js +9 -0
- package/flow-diagram/src/document/document.rect.js.map +1 -0
- package/flow-diagram/src/document/index.d.ts +3 -0
- package/flow-diagram/src/document/index.js +4 -0
- package/flow-diagram/src/document/index.js.map +1 -0
- package/flow-diagram/src/externStorage/externStorage.anchor.d.ts +2 -0
- package/flow-diagram/src/externStorage/externStorage.anchor.js +8 -0
- package/flow-diagram/src/externStorage/externStorage.anchor.js.map +1 -0
- package/flow-diagram/src/externStorage/externStorage.d.ts +2 -0
- package/flow-diagram/src/externStorage/externStorage.js +12 -0
- package/flow-diagram/src/externStorage/externStorage.js.map +1 -0
- package/flow-diagram/src/externStorage/externStorage.rect.d.ts +3 -0
- package/flow-diagram/src/externStorage/externStorage.rect.js +9 -0
- package/flow-diagram/src/externStorage/externStorage.rect.js.map +1 -0
- package/flow-diagram/src/externStorage/index.d.ts +3 -0
- package/flow-diagram/src/externStorage/index.js +4 -0
- package/flow-diagram/src/externStorage/index.js.map +1 -0
- package/flow-diagram/src/internalStorage/index.d.ts +2 -0
- package/flow-diagram/src/internalStorage/index.js +3 -0
- package/flow-diagram/src/internalStorage/index.js.map +1 -0
- package/flow-diagram/src/internalStorage/internalStorage.d.ts +2 -0
- package/flow-diagram/src/internalStorage/internalStorage.js +16 -0
- package/flow-diagram/src/internalStorage/internalStorage.js.map +1 -0
- package/flow-diagram/src/internalStorage/internalStorage.rect.d.ts +3 -0
- package/flow-diagram/src/internalStorage/internalStorage.rect.js +10 -0
- package/flow-diagram/src/internalStorage/internalStorage.rect.js.map +1 -0
- package/flow-diagram/src/manually/index.d.ts +3 -0
- package/flow-diagram/src/manually/index.js +4 -0
- package/flow-diagram/src/manually/index.js.map +1 -0
- package/flow-diagram/src/manually/manually.anchor.d.ts +2 -0
- package/flow-diagram/src/manually/manually.anchor.js +8 -0
- package/flow-diagram/src/manually/manually.anchor.js.map +1 -0
- package/flow-diagram/src/manually/manually.d.ts +2 -0
- package/flow-diagram/src/manually/manually.js +12 -0
- package/flow-diagram/src/manually/manually.js.map +1 -0
- package/flow-diagram/src/manually/manually.rect.d.ts +3 -0
- package/flow-diagram/src/manually/manually.rect.js +9 -0
- package/flow-diagram/src/manually/manually.rect.js.map +1 -0
- package/flow-diagram/src/parallel/index.d.ts +2 -0
- package/flow-diagram/src/parallel/index.js +3 -0
- package/flow-diagram/src/parallel/index.js.map +1 -0
- package/flow-diagram/src/parallel/parallel.anchor.d.ts +2 -0
- package/flow-diagram/src/parallel/parallel.anchor.js +6 -0
- package/flow-diagram/src/parallel/parallel.anchor.js.map +1 -0
- package/flow-diagram/src/parallel/parallel.d.ts +2 -0
- package/flow-diagram/src/parallel/parallel.js +9 -0
- package/flow-diagram/src/parallel/parallel.js.map +1 -0
- package/flow-diagram/src/queue/index.d.ts +2 -0
- package/flow-diagram/src/queue/index.js +3 -0
- package/flow-diagram/src/queue/index.js.map +1 -0
- package/flow-diagram/src/queue/queue.d.ts +2 -0
- package/flow-diagram/src/queue/queue.js +9 -0
- package/flow-diagram/src/queue/queue.js.map +1 -0
- package/flow-diagram/src/queue/queue.rect.d.ts +3 -0
- package/flow-diagram/src/queue/queue.rect.js +11 -0
- package/flow-diagram/src/queue/queue.rect.js.map +1 -0
- package/flow-diagram/src/register.d.ts +1 -0
- package/flow-diagram/src/register.js +26 -0
- package/flow-diagram/src/register.js.map +1 -0
- package/flow-diagram/src/subprocess/index.d.ts +2 -0
- package/flow-diagram/src/subprocess/index.js +3 -0
- package/flow-diagram/src/subprocess/index.js.map +1 -0
- package/flow-diagram/src/subprocess/subprocess.d.ts +2 -0
- package/flow-diagram/src/subprocess/subprocess.js +16 -0
- package/flow-diagram/src/subprocess/subprocess.js.map +1 -0
- package/flow-diagram/src/subprocess/subprocess.rect.d.ts +3 -0
- package/flow-diagram/src/subprocess/subprocess.rect.js +9 -0
- package/flow-diagram/src/subprocess/subprocess.rect.js.map +1 -0
- package/layout/index.d.ts +2 -0
- package/layout/index.js +3 -0
- package/layout/index.js.map +1 -0
- package/layout/src/align.d.ts +3 -0
- package/layout/src/align.js +67 -0
- package/layout/src/align.js.map +1 -0
- package/layout/src/layout.d.ts +9 -0
- package/layout/src/layout.js +50 -0
- package/layout/src/layout.js.map +1 -0
- package/myShape-diagram/myShape.js +196 -0
- package/myShape-diagram/myShape.ts +1 -0
- package/package.json +15 -0
- package/sequence-diagram/index.d.ts +3 -0
- package/sequence-diagram/index.js +4 -0
- package/sequence-diagram/index.js.map +1 -0
- package/sequence-diagram/src/focus/focus.anchor.d.ts +2 -0
- package/sequence-diagram/src/focus/focus.anchor.js +15 -0
- package/sequence-diagram/src/focus/focus.anchor.js.map +1 -0
- package/sequence-diagram/src/focus/focus.d.ts +2 -0
- package/sequence-diagram/src/focus/focus.js +13 -0
- package/sequence-diagram/src/focus/focus.js.map +1 -0
- package/sequence-diagram/src/focus/focus.rect.d.ts +3 -0
- package/sequence-diagram/src/focus/focus.rect.js +9 -0
- package/sequence-diagram/src/focus/focus.rect.js.map +1 -0
- package/sequence-diagram/src/focus/index.d.ts +3 -0
- package/sequence-diagram/src/focus/index.js +4 -0
- package/sequence-diagram/src/focus/index.js.map +1 -0
- package/sequence-diagram/src/lifeline/index.d.ts +3 -0
- package/sequence-diagram/src/lifeline/index.js +4 -0
- package/sequence-diagram/src/lifeline/index.js.map +1 -0
- package/sequence-diagram/src/lifeline/lifeline.anchor.d.ts +2 -0
- package/sequence-diagram/src/lifeline/lifeline.anchor.js +9 -0
- package/sequence-diagram/src/lifeline/lifeline.anchor.js.map +1 -0
- package/sequence-diagram/src/lifeline/lifeline.d.ts +2 -0
- package/sequence-diagram/src/lifeline/lifeline.js +35 -0
- package/sequence-diagram/src/lifeline/lifeline.js.map +1 -0
- package/sequence-diagram/src/lifeline/lifeline.rect.d.ts +3 -0
- package/sequence-diagram/src/lifeline/lifeline.rect.js +9 -0
- package/sequence-diagram/src/lifeline/lifeline.rect.js.map +1 -0
- package/sequence-diagram/src/register.d.ts +1 -0
- package/sequence-diagram/src/register.js +8 -0
- package/sequence-diagram/src/register.js.map +1 -0
@@ -0,0 +1,2447 @@
|
|
1
|
+
var __spreadArrays = (this && this.__spreadArrays) || function () {
|
2
|
+
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
3
|
+
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
4
|
+
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
5
|
+
r[k] = a[j];
|
6
|
+
return r;
|
7
|
+
};
|
8
|
+
!function (e) { if ("object" == typeof exports && "undefined" != typeof module)
|
9
|
+
module.exports = e();
|
10
|
+
else if ("function" == typeof define && define.amd)
|
11
|
+
define([], e);
|
12
|
+
else {
|
13
|
+
("undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : this).mqtt = e();
|
14
|
+
} }(function () { return function () { return function e(t, r, n) { function i(s, a) { if (!r[s]) {
|
15
|
+
if (!t[s]) {
|
16
|
+
var u = "function" == typeof require && require;
|
17
|
+
if (!a && u)
|
18
|
+
return u(s, !0);
|
19
|
+
if (o)
|
20
|
+
return o(s, !0);
|
21
|
+
var c = new Error("Cannot find module '" + s + "'");
|
22
|
+
throw c.code = "MODULE_NOT_FOUND", c;
|
23
|
+
}
|
24
|
+
var l = r[s] = { exports: {} };
|
25
|
+
t[s][0].call(l.exports, function (e) { return i(t[s][1][e] || e); }, l, l.exports, e, t, r, n);
|
26
|
+
} return r[s].exports; } for (var o = "function" == typeof require && require, s = 0; s < n.length; s++)
|
27
|
+
i(n[s]); return i; }; }()({ 1: [function (e, t, r) { (function (r, n) {
|
28
|
+
"use strict";
|
29
|
+
var i = e("events").EventEmitter, o = e("./store"), s = e("mqtt-packet"), a = e("readable-stream").Writable, u = e("inherits"), c = e("reinterval"), l = e("./validations"), f = e("xtend"), p = e("debug")("mqttjs:client"), h = n.setImmediate || function (e) { r.nextTick(e); }, d = { keepalive: 60, reschedulePings: !0, protocolId: "MQTT", protocolVersion: 4, reconnectPeriod: 1e3, connectTimeout: 3e4, clean: !0, resubscribe: !0 }, g = ["ECONNREFUSED", "EADDRINUSE", "ECONNRESET", "ENOTFOUND"], b = { 0: "", 1: "Unacceptable protocol version", 2: "Identifier rejected", 3: "Server unavailable", 4: "Bad username or password", 5: "Not authorized", 16: "No matching subscribers", 17: "No subscription existed", 128: "Unspecified error", 129: "Malformed Packet", 130: "Protocol Error", 131: "Implementation specific error", 132: "Unsupported Protocol Version", 133: "Client Identifier not valid", 134: "Bad User Name or Password", 135: "Not authorized", 136: "Server unavailable", 137: "Server busy", 138: "Banned", 139: "Server shutting down", 140: "Bad authentication method", 141: "Keep Alive timeout", 142: "Session taken over", 143: "Topic Filter invalid", 144: "Topic Name invalid", 145: "Packet identifier in use", 146: "Packet Identifier not found", 147: "Receive Maximum exceeded", 148: "Topic Alias invalid", 149: "Packet too large", 150: "Message rate too high", 151: "Quota exceeded", 152: "Administrative action", 153: "Payload format invalid", 154: "Retain not supported", 155: "QoS not supported", 156: "Use another server", 157: "Server moved", 158: "Shared Subscriptions not supported", 159: "Connection rate exceeded", 160: "Maximum connect time", 161: "Subscription Identifiers not supported", 162: "Wildcard Subscriptions not supported" };
|
30
|
+
function y(e, t, r) { p("sendPacket :: packet: %O", t), p("sendPacket :: emitting `packetsend`"), e.emit("packetsend", t), p("sendPacket :: writing to stream"); var n = s.writeToStream(t, e.stream, e.options); p("sendPacket :: writeToStream result %s", n), !n && r ? (p("sendPacket :: handle events on `drain` once through callback."), e.stream.once("drain", r)) : r && (p("sendPacket :: invoking cb"), r()); }
|
31
|
+
function m(e, t, r, n) { p("storeAndSend :: store packet with cmd %s to outgoingStore", t.cmd), e.outgoingStore.put(t, function (i) { if (i)
|
32
|
+
return r && r(i); n(), y(e, t, r); }); }
|
33
|
+
function _(e) { p("nop ::", e); }
|
34
|
+
function v(e, t) { var r, n = this; if (!(this instanceof v))
|
35
|
+
return new v(e, t); for (r in this.options = t || {}, d)
|
36
|
+
void 0 === this.options[r] ? this.options[r] = d[r] : this.options[r] = t[r]; p("MqttClient :: options.protocol", t.protocol), p("MqttClient :: options.protocolVersion", t.protocolVersion), p("MqttClient :: options.username", t.username), p("MqttClient :: options.keepalive", t.keepalive), p("MqttClient :: options.reconnectPeriod", t.reconnectPeriod), p("MqttClient :: options.rejectUnauthorized", t.rejectUnauthorized), this.options.clientId = "string" == typeof t.clientId ? t.clientId : "mqttjs_" + Math.random().toString(16).substr(2, 8), p("MqttClient :: clientId", this.options.clientId), this.options.customHandleAcks = 5 === t.protocolVersion && t.customHandleAcks ? t.customHandleAcks : function () { arguments[3](0); }, this.streamBuilder = e, this.outgoingStore = t.outgoingStore || new o, this.incomingStore = t.incomingStore || new o, this.queueQoSZero = void 0 === t.queueQoSZero || t.queueQoSZero, this._resubscribeTopics = {}, this.messageIdToTopic = {}, this.pingTimer = null, this.connected = !1, this.disconnecting = !1, this.queue = [], this.connackTimer = null, this.reconnectTimer = null, this._storeProcessing = !1, this._packetIdsDuringStoreProcessing = {}, this.nextId = Math.max(1, Math.floor(65535 * Math.random())), this.outgoing = {}, this._firstConnection = !0, this.on("connect", function () { var e = this.queue; p("connect :: sending queued packets"), function t() { var r = e.shift(); p("deliver :: entry %o", r); var i; r && (i = r.packet, p("deliver :: call _sendPacket for %o", i), n._sendPacket(i, function (e) { r.cb && r.cb(e), t(); })); }(); }), this.on("close", function () { p("close :: connected set to `false`"), this.connected = !1, p("close :: clearing connackTimer"), clearTimeout(this.connackTimer), p("close :: clearing ping timer"), null !== n.pingTimer && (n.pingTimer.clear(), n.pingTimer = null), p("close :: calling _setupReconnect"), this._setupReconnect(); }), i.call(this), p("MqttClient :: setting up stream"), this._setupStream(); }
|
37
|
+
u(v, i), v.prototype._setupStream = function () {
|
38
|
+
var _this = this;
|
39
|
+
var e, t = this, n = new a, i = s.parser(this.options), o = null, u = [];
|
40
|
+
function c() { if (u.length)
|
41
|
+
r.nextTick(l);
|
42
|
+
else {
|
43
|
+
var e = o;
|
44
|
+
o = null, e();
|
45
|
+
} }
|
46
|
+
function l() { p("work :: getting next packet in queue"); var e = u.shift(); if (e)
|
47
|
+
p("work :: packet pulled from queue"), t._handlePacket(e, c);
|
48
|
+
else {
|
49
|
+
p("work :: no packets in queue");
|
50
|
+
var r = o;
|
51
|
+
o = null, p("work :: done flag is %s", !!r), r && r();
|
52
|
+
} }
|
53
|
+
if (p("_setupStream :: calling method to clear reconnect"), this._clearReconnect(), p("_setupStream :: using streamBuilder provided to client to create stream"), this.stream = this.streamBuilder(this), i.on("packet", function (e) { p("parser :: on packet push to packets array."), u.push(e); }), n._write = function (e, t, r) { o = r, p("writable stream :: parsing buffer"), i.parse(e), l(); }, p("_setupStream :: pipe stream to writable stream"), this.stream.pipe(n), this.stream.on("error", function (e) { p("streamErrorHandler :: error", e.message), g.includes(e.code) ? (p("streamErrorHandler :: emitting error"), t.emit("error", e)) : _(e); }), this.stream.on("close", function () { var e; p("(%s)stream :: on close", t.options.clientId), (e = t.outgoing) && (p("flushVolatile :: deleting volatile messages from the queue and setting their callbacks as error function"), Object.keys(e).forEach(function (t) { e[t].volatile && "function" == typeof e[t].cb && (e[t].cb(new Error("Connection closed")), delete e[t]); })), p("stream: emit close to MqttClient"), t.emit("close"); }), p("_setupStream: sending packet `connect`"), (e = Object.create(this.options)).cmd = "connect", y(this, e), i.on("error", this.emit.bind(this, "error")), this.options.properties) {
|
54
|
+
if (!this.options.properties.authenticationMethod && this.options.properties.authenticationData)
|
55
|
+
return t.end(function () { return _this.emit("error", new Error("Packet has no Authentication Method")); }), this;
|
56
|
+
if (this.options.properties.authenticationMethod && this.options.authPacket && "object" == typeof this.options.authPacket)
|
57
|
+
y(this, f({ cmd: "auth", reasonCode: 0 }, this.options.authPacket));
|
58
|
+
}
|
59
|
+
this.stream.setMaxListeners(1e3), clearTimeout(this.connackTimer), this.connackTimer = setTimeout(function () { p("!!connectTimeout hit!! Calling _cleanUp with force `true`"), t._cleanUp(!0); }, this.options.connectTimeout);
|
60
|
+
}, v.prototype._handlePacket = function (e, t) { var r = this.options; if (5 === r.protocolVersion && r.properties && r.properties.maximumPacketSize && r.properties.maximumPacketSize < e.length)
|
61
|
+
return this.emit("error", new Error("exceeding packets size " + e.cmd)), this.end({ reasonCode: 149, properties: { reasonString: "Maximum packet size was exceeded" } }), this; switch (p("_handlePacket :: emitting packetreceive"), this.emit("packetreceive", e), e.cmd) {
|
62
|
+
case "publish":
|
63
|
+
this._handlePublish(e, t);
|
64
|
+
break;
|
65
|
+
case "puback":
|
66
|
+
case "pubrec":
|
67
|
+
case "pubcomp":
|
68
|
+
case "suback":
|
69
|
+
case "unsuback":
|
70
|
+
this._handleAck(e), t();
|
71
|
+
break;
|
72
|
+
case "pubrel":
|
73
|
+
this._handlePubrel(e, t);
|
74
|
+
break;
|
75
|
+
case "connack":
|
76
|
+
this._handleConnack(e), t();
|
77
|
+
break;
|
78
|
+
case "pingresp":
|
79
|
+
this._handlePingresp(e), t();
|
80
|
+
break;
|
81
|
+
case "disconnect": this._handleDisconnect(e), t();
|
82
|
+
} }, v.prototype._checkDisconnecting = function (e) { return this.disconnecting && (e ? e(new Error("client disconnecting")) : this.emit("error", new Error("client disconnecting"))), this.disconnecting; }, v.prototype.publish = function (e, t, r, n) { var i; p("publish :: message `%s` to topic `%s`", t, e); var o = this.options; "function" == typeof r && (n = r, r = null); if (r = f({ qos: 0, retain: !1, dup: !1 }, r), this._checkDisconnecting(n))
|
83
|
+
return this; switch (i = { cmd: "publish", topic: e, payload: t, qos: r.qos, retain: r.retain, messageId: this._nextId(), dup: r.dup }, 5 === o.protocolVersion && (i.properties = r.properties, (!o.properties && i.properties && i.properties.topicAlias || r.properties && o.properties && (r.properties.topicAlias && o.properties.topicAliasMaximum && r.properties.topicAlias > o.properties.topicAliasMaximum || !o.properties.topicAliasMaximum && r.properties.topicAlias)) && delete i.properties.topicAlias), p("publish :: qos", r.qos), r.qos) {
|
84
|
+
case 1:
|
85
|
+
case 2:
|
86
|
+
this.outgoing[i.messageId] = { volatile: !1, cb: n || _ }, this._storeProcessing ? (p("_storeProcessing enabled"), this._packetIdsDuringStoreProcessing[i.messageId] = !1, this._storePacket(i, void 0, r.cbStorePut)) : (p("MqttClient:publish: packet cmd: %s", i.cmd), this._sendPacket(i, void 0, r.cbStorePut));
|
87
|
+
break;
|
88
|
+
default: this._storeProcessing ? (p("_storeProcessing enabled"), this._storePacket(i, n, r.cbStorePut)) : (p("MqttClient:publish: packet cmd: %s", i.cmd), this._sendPacket(i, n, r.cbStorePut));
|
89
|
+
} return this; }, v.prototype.subscribe = function () { for (var e, t = new Array(arguments.length), r = 0; r < arguments.length; r++)
|
90
|
+
t[r] = arguments[r]; var n, i = [], o = t.shift(), s = o.resubscribe, a = t.pop() || _, u = t.pop(), c = this, d = this.options.protocolVersion; if (delete o.resubscribe, "string" == typeof o && (o = [o]), "function" != typeof a && (u = a, a = _), null !== (n = l.validateTopics(o)))
|
91
|
+
return h(a, new Error("Invalid topic " + n)), this; if (this._checkDisconnecting(a))
|
92
|
+
return p("subscribe: discconecting true"), this; var g = { qos: 0 }; if (5 === d && (g.nl = !1, g.rap = !1, g.rh = 0), u = f(g, u), Array.isArray(o) ? o.forEach(function (e) { if (p("subscribe: array topic %s", e), !c._resubscribeTopics.hasOwnProperty(e) || c._resubscribeTopics[e].qos < u.qos || s) {
|
93
|
+
var t = { topic: e, qos: u.qos };
|
94
|
+
5 === d && (t.nl = u.nl, t.rap = u.rap, t.rh = u.rh, t.properties = u.properties), p("subscribe: pushing topic `%s` and qos `%s` to subs list", t.topic, t.qos), i.push(t);
|
95
|
+
} }) : Object.keys(o).forEach(function (e) { if (p("subscribe: object topic %s", e), !c._resubscribeTopics.hasOwnProperty(e) || c._resubscribeTopics[e].qos < o[e].qos || s) {
|
96
|
+
var t = { topic: e, qos: o[e].qos };
|
97
|
+
5 === d && (t.nl = o[e].nl, t.rap = o[e].rap, t.rh = o[e].rh, t.properties = u.properties), p("subscribe: pushing `%s` to subs list", t), i.push(t);
|
98
|
+
} }), e = { cmd: "subscribe", subscriptions: i, qos: 1, retain: !1, dup: !1, messageId: this._nextId() }, u.properties && (e.properties = u.properties), i.length) {
|
99
|
+
if (this.options.resubscribe) {
|
100
|
+
p("subscribe :: resubscribe true");
|
101
|
+
var b = [];
|
102
|
+
i.forEach(function (e) { if (c.options.reconnectPeriod > 0) {
|
103
|
+
var t = { qos: e.qos };
|
104
|
+
5 === d && (t.nl = e.nl || !1, t.rap = e.rap || !1, t.rh = e.rh || 0, t.properties = e.properties), c._resubscribeTopics[e.topic] = t, b.push(e.topic);
|
105
|
+
} }), c.messageIdToTopic[e.messageId] = b;
|
106
|
+
}
|
107
|
+
return this.outgoing[e.messageId] = { volatile: !0, cb: function (e, t) { if (!e)
|
108
|
+
for (var r = t.granted, n = 0; n < r.length; n += 1)
|
109
|
+
i[n].qos = r[n]; a(e, i); } }, p("subscribe :: call _sendPacket"), this._sendPacket(e), this;
|
110
|
+
} a(null, []); }, v.prototype.unsubscribe = function () { for (var e = { cmd: "unsubscribe", qos: 1, messageId: this._nextId() }, t = this, r = new Array(arguments.length), n = 0; n < arguments.length; n++)
|
111
|
+
r[n] = arguments[n]; var i = r.shift(), o = r.pop() || _, s = r.pop(); return "string" == typeof i && (i = [i]), "function" != typeof o && (s = o, o = _), this._checkDisconnecting(o) ? this : ("string" == typeof i ? e.unsubscriptions = [i] : Array.isArray(i) && (e.unsubscriptions = i), this.options.resubscribe && e.unsubscriptions.forEach(function (e) { delete t._resubscribeTopics[e]; }), "object" == typeof s && s.properties && (e.properties = s.properties), this.outgoing[e.messageId] = { volatile: !0, cb: o }, p("unsubscribe: call _sendPacket"), this._sendPacket(e), this); }, v.prototype.end = function (e, t, n) { var i = this; function o() { p("end :: (%s) :: finish :: calling _cleanUp with force %s", i.options.clientId, e), i._cleanUp(e, function () { p("end :: finish :: calling process.nextTick on closeStores"), r.nextTick(function () { p("end :: closeStores: closing incoming and outgoing stores"), i.disconnected = !0, i.incomingStore.close(function () { i.outgoingStore.close(function () { p("end :: closeStores: emitting end"), i.emit("end"), n && (p("end :: closeStores: invoking callback with args"), n()); }); }), i._deferredReconnect && i._deferredReconnect(); }.bind(i)); }, t); } return p("end :: (%s)", this.options.clientId), null != e && "boolean" == typeof e || (n = t || _, t = e, e = !1, "object" != typeof t && (n = t, t = null, "function" != typeof n && (n = _))), "object" != typeof t && (n = t, t = null), p("end :: cb? %s", !!n), n = n || _, this.disconnecting ? (n(), this) : (this._clearReconnect(), this.disconnecting = !0, !e && Object.keys(this.outgoing).length > 0 ? (p("end :: (%s) :: calling finish in 10ms once outgoing is empty", i.options.clientId), this.once("outgoingEmpty", setTimeout.bind(null, o, 10))) : (p("end :: (%s) :: immediately calling finish", i.options.clientId), o()), this); }, v.prototype.removeOutgoingMessage = function (e) { var t = this.outgoing[e] ? this.outgoing[e].cb : null; return delete this.outgoing[e], this.outgoingStore.del({ messageId: e }, function () { t(new Error("Message removed")); }), this; }, v.prototype.reconnect = function (e) { p("client reconnect"); var t = this, r = function () { e ? (t.options.incomingStore = e.incomingStore, t.options.outgoingStore = e.outgoingStore) : (t.options.incomingStore = null, t.options.outgoingStore = null), t.incomingStore = t.options.incomingStore || new o, t.outgoingStore = t.options.outgoingStore || new o, t.disconnecting = !1, t.disconnected = !1, t._deferredReconnect = null, t._reconnect(); }; return this.disconnecting && !this.disconnected ? this._deferredReconnect = r : r(), this; }, v.prototype._reconnect = function () { p("_reconnect: emitting reconnect to client"), this.emit("reconnect"), p("_reconnect: calling _setupStream"), this._setupStream(); }, v.prototype._setupReconnect = function () { var e = this; !e.disconnecting && !e.reconnectTimer && e.options.reconnectPeriod > 0 ? (this.reconnecting || (p("_setupReconnect :: emit `offline` state"), this.emit("offline"), p("_setupReconnect :: set `reconnecting` to `true`"), this.reconnecting = !0), p("_setupReconnect :: setting reconnectTimer for %d ms", e.options.reconnectPeriod), e.reconnectTimer = setInterval(function () { p("reconnectTimer :: reconnect triggered!"), e._reconnect(); }, e.options.reconnectPeriod)) : p("_setupReconnect :: doing nothing..."); }, v.prototype._clearReconnect = function () { p("_clearReconnect : clearing reconnect timer"), this.reconnectTimer && (clearInterval(this.reconnectTimer), this.reconnectTimer = null); }, v.prototype._cleanUp = function (e, t) { var r, n = arguments[2]; if (t && (p("_cleanUp :: done callback provided for on stream close"), this.stream.on("close", t)), p("_cleanUp :: forced? %s", e), e)
|
112
|
+
0 === this.options.reconnectPeriod && this.options.clean && (r = this.outgoing) && (p("flush: queue exists? %b", !!r), Object.keys(r).forEach(function (e) { "function" == typeof r[e].cb && (r[e].cb(new Error("Connection closed")), delete r[e]); })), p("_cleanUp :: (%s) :: destroying stream", this.options.clientId), this.stream.destroy();
|
113
|
+
else {
|
114
|
+
var i = f({ cmd: "disconnect" }, n);
|
115
|
+
p("_cleanUp :: (%s) :: call _sendPacket with disconnect packet", this.options.clientId), this._sendPacket(i, h.bind(null, this.stream.end.bind(this.stream)));
|
116
|
+
} this.disconnecting || (p("_cleanUp :: client not disconnecting. Clearing and resetting reconnect."), this._clearReconnect(), this._setupReconnect()), null !== this.pingTimer && (p("_cleanUp :: clearing pingTimer"), this.pingTimer.clear(), this.pingTimer = null), t && !this.connected && (p("_cleanUp :: (%s) :: removing stream `done` callback `close` listener", this.options.clientId), this.stream.removeListener("close", t), t()); }, v.prototype._sendPacket = function (e, t, r) { if (p("_sendPacket :: (%s) :: start", this.options.clientId), r = r || _, !this.connected)
|
117
|
+
return p("_sendPacket :: client not connected. Storing packet offline."), void this._storePacket(e, t, r); switch (this._shiftPingInterval(), e.cmd) {
|
118
|
+
case "publish": break;
|
119
|
+
case "pubrel": return void m(this, e, t, r);
|
120
|
+
default: return void y(this, e, t);
|
121
|
+
} switch (e.qos) {
|
122
|
+
case 2:
|
123
|
+
case 1:
|
124
|
+
m(this, e, t, r);
|
125
|
+
break;
|
126
|
+
case 0:
|
127
|
+
default: y(this, e, t);
|
128
|
+
} p("_sendPacket :: (%s) :: end", this.options.clientId); }, v.prototype._storePacket = function (e, t, r) { p("_storePacket :: packet: %o", e), p("_storePacket :: cb? %s", !!t), r = r || _, 0 === (e.qos || 0) && this.queueQoSZero || "publish" !== e.cmd ? this.queue.push({ packet: e, cb: t }) : e.qos > 0 ? (t = this.outgoing[e.messageId] ? this.outgoing[e.messageId].cb : null, this.outgoingStore.put(e, function (e) { if (e)
|
129
|
+
return t && t(e); r(); })) : t && t(new Error("No connection to broker")); }, v.prototype._setupPingTimer = function () { p("_setupPingTimer :: keepalive %d (seconds)", this.options.keepalive); var e = this; !this.pingTimer && this.options.keepalive && (this.pingResp = !0, this.pingTimer = c(function () { e._checkPing(); }, 1e3 * this.options.keepalive)); }, v.prototype._shiftPingInterval = function () { this.pingTimer && this.options.keepalive && this.options.reschedulePings && this.pingTimer.reschedule(1e3 * this.options.keepalive); }, v.prototype._checkPing = function () { p("_checkPing :: checking ping..."), this.pingResp ? (p("_checkPing :: ping response received. Clearing flag and sending `pingreq`"), this.pingResp = !1, this._sendPacket({ cmd: "pingreq" })) : (p("_checkPing :: calling _cleanUp with force true"), this._cleanUp(!0)); }, v.prototype._handlePingresp = function () { this.pingResp = !0; }, v.prototype._handleConnack = function (e) { p("_handleConnack"); var t = this.options, r = 5 === t.protocolVersion ? e.reasonCode : e.returnCode; if (clearTimeout(this.connackTimer), e.properties && (e.properties.topicAliasMaximum && (t.properties || (t.properties = {}), t.properties.topicAliasMaximum = e.properties.topicAliasMaximum), e.properties.serverKeepAlive && t.keepalive && (t.keepalive = e.properties.serverKeepAlive, this._shiftPingInterval()), e.properties.maximumPacketSize && (t.properties || (t.properties = {}), t.properties.maximumPacketSize = e.properties.maximumPacketSize)), 0 === r)
|
130
|
+
this.reconnecting = !1, this._onConnect(e);
|
131
|
+
else if (r > 0) {
|
132
|
+
var n = new Error("Connection refused: " + b[r]);
|
133
|
+
n.code = r, this.emit("error", n);
|
134
|
+
} }, v.prototype._handlePublish = function (e, t) { p("_handlePublish: packet %o", e), t = void 0 !== t ? t : _; var r = e.topic.toString(), n = e.payload, i = e.qos, o = e.messageId, s = this, a = this.options, u = [0, 16, 128, 131, 135, 144, 145, 151, 153]; switch (p("_handlePublish: qos %d", i), i) {
|
135
|
+
case 2:
|
136
|
+
a.customHandleAcks(r, n, e, function (r, n) { return r instanceof Error || (n = r, r = null), r ? s.emit("error", r) : -1 === u.indexOf(n) ? s.emit("error", new Error("Wrong reason code for pubrec")) : void (n ? s._sendPacket({ cmd: "pubrec", messageId: o, reasonCode: n }, t) : s.incomingStore.put(e, function () { s._sendPacket({ cmd: "pubrec", messageId: o }, t); })); });
|
137
|
+
break;
|
138
|
+
case 1:
|
139
|
+
a.customHandleAcks(r, n, e, function (i, a) { return i instanceof Error || (a = i, i = null), i ? s.emit("error", i) : -1 === u.indexOf(a) ? s.emit("error", new Error("Wrong reason code for puback")) : (a || s.emit("message", r, n, e), void s.handleMessage(e, function (e) { if (e)
|
140
|
+
return t && t(e); s._sendPacket({ cmd: "puback", messageId: o, reasonCode: a }, t); })); });
|
141
|
+
break;
|
142
|
+
case 0:
|
143
|
+
this.emit("message", r, n, e), this.handleMessage(e, t);
|
144
|
+
break;
|
145
|
+
default: p("_handlePublish: unknown QoS. Doing nothing.");
|
146
|
+
} }, v.prototype.handleMessage = function (e, t) { t(); }, v.prototype._handleAck = function (e) { var t, r = e.messageId, n = e.cmd, i = null, o = this.outgoing[r] ? this.outgoing[r].cb : null, s = this; if (o) {
|
147
|
+
switch ((p("_handleAck :: packet type", n), n)) {
|
148
|
+
case "pubcomp":
|
149
|
+
case "puback":
|
150
|
+
var a = e.reasonCode;
|
151
|
+
a && a > 0 && 16 !== a && ((t = new Error("Publish error: " + b[a])).code = a, o(t, e)), delete this.outgoing[r], this.outgoingStore.del(e, o);
|
152
|
+
break;
|
153
|
+
case "pubrec":
|
154
|
+
i = { cmd: "pubrel", qos: 2, messageId: r };
|
155
|
+
var u = e.reasonCode;
|
156
|
+
u && u > 0 && 16 !== u ? ((t = new Error("Publish error: " + b[u])).code = u, o(t, e)) : this._sendPacket(i);
|
157
|
+
break;
|
158
|
+
case "suback":
|
159
|
+
delete this.outgoing[r];
|
160
|
+
for (var c = 0; c < e.granted.length; c++)
|
161
|
+
if (0 != (128 & e.granted[c])) {
|
162
|
+
var l = this.messageIdToTopic[r];
|
163
|
+
l && l.forEach(function (e) { delete s._resubscribeTopics[e]; });
|
164
|
+
}
|
165
|
+
o(null, e);
|
166
|
+
break;
|
167
|
+
case "unsuback":
|
168
|
+
delete this.outgoing[r], o(null);
|
169
|
+
break;
|
170
|
+
default: s.emit("error", new Error("unrecognized packet type"));
|
171
|
+
}
|
172
|
+
this.disconnecting && 0 === Object.keys(this.outgoing).length && this.emit("outgoingEmpty");
|
173
|
+
}
|
174
|
+
else
|
175
|
+
p("_handleAck :: Server sent an ack in error. Ignoring."); }, v.prototype._handlePubrel = function (e, t) { p("handling pubrel packet"), t = void 0 !== t ? t : _; var r = this, n = { cmd: "pubcomp", messageId: e.messageId }; r.incomingStore.get(e, function (e, i) { e ? r._sendPacket(n, t) : (r.emit("message", i.topic, i.payload, i), r.handleMessage(i, function (e) { if (e)
|
176
|
+
return t(e); r.incomingStore.del(i, _), r._sendPacket(n, t); })); }); }, v.prototype._handleDisconnect = function (e) { this.emit("disconnect", e); }, v.prototype._nextId = function () { var e = this.nextId++; return 65536 === this.nextId && (this.nextId = 1), e; }, v.prototype.getLastMessageId = function () { return 1 === this.nextId ? 65535 : this.nextId - 1; }, v.prototype._resubscribe = function (e) { p("_resubscribe"); var t = Object.keys(this._resubscribeTopics); if (!this._firstConnection && (this.options.clean || 5 === this.options.protocolVersion && !e.sessionPresent) && t.length > 0)
|
177
|
+
if (this.options.resubscribe)
|
178
|
+
if (5 === this.options.protocolVersion) {
|
179
|
+
p("_resubscribe: protocolVersion 5");
|
180
|
+
for (var r = 0; r < t.length; r++) {
|
181
|
+
var n = {};
|
182
|
+
n[t[r]] = this._resubscribeTopics[t[r]], n.resubscribe = !0, this.subscribe(n, { properties: n[t[r]].properties });
|
183
|
+
}
|
184
|
+
}
|
185
|
+
else
|
186
|
+
this._resubscribeTopics.resubscribe = !0, this.subscribe(this._resubscribeTopics);
|
187
|
+
else
|
188
|
+
this._resubscribeTopics = {}; this._firstConnection = !1; }, v.prototype._onConnect = function (e) { if (this.disconnected)
|
189
|
+
this.emit("connect", e);
|
190
|
+
else {
|
191
|
+
var t = this;
|
192
|
+
this._setupPingTimer(), this._resubscribe(e), this.connected = !0, function r() { var n = t.outgoingStore.createStream(); function i() { t._storeProcessing = !1, t._packetIdsDuringStoreProcessing = {}; } function o() { n.destroy(), n = null, i(); } t.once("close", o), n.on("error", function (e) { i(), t.removeListener("close", o), t.emit("error", e); }), n.on("end", function () { var n = !0; for (var s in t._packetIdsDuringStoreProcessing)
|
193
|
+
if (!t._packetIdsDuringStoreProcessing[s]) {
|
194
|
+
n = !1;
|
195
|
+
break;
|
196
|
+
} n ? (i(), t.removeListener("close", o), t.emit("connect", e)) : r(); }), function e() { if (n) {
|
197
|
+
t._storeProcessing = !0;
|
198
|
+
var r, i = n.read(1);
|
199
|
+
i ? t._packetIdsDuringStoreProcessing[i.messageId] ? e() : t.disconnecting || t.reconnectTimer ? n.destroy && n.destroy() : (r = t.outgoing[i.messageId] ? t.outgoing[i.messageId].cb : null, t.outgoing[i.messageId] = { volatile: !1, cb: function (t, n) { r && r(t, n), e(); } }, t._packetIdsDuringStoreProcessing[i.messageId] = !0, t._sendPacket(i)) : n.once("readable", e);
|
200
|
+
} }(); }();
|
201
|
+
} }, t.exports = v;
|
202
|
+
}).call(this, e("_process"), "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {}); }, { "./store": 7, "./validations": 8, _process: 100, debug: 17, events: 83, inherits: 88, "mqtt-packet": 92, "readable-stream": 116, reinterval: 117, xtend: 140 }], 2: [function (e, t, r) { (function (r) {
|
203
|
+
"use strict";
|
204
|
+
var n, i, o, s = e("readable-stream").Transform, a = e("duplexify"), u = e("base64-js"), c = !1;
|
205
|
+
t.exports = function (e, t) { if (t.hostname = t.hostname || t.host, !t.hostname)
|
206
|
+
throw new Error("Could not determine host. Specify host manually."); var l = "MQIsdp" === t.protocolId && 3 === t.protocolVersion ? "mqttv3.1" : "mqtt"; !function (e) { e.hostname || (e.hostname = "localhost"), e.path || (e.path = "/"), e.wsOptions || (e.wsOptions = {}); }(t); var f = function (e, t) { var r = "alis" === e.protocol ? "wss" : "ws", n = r + "://" + e.hostname + e.path; return e.port && 80 !== e.port && 443 !== e.port && (n = r + "://" + e.hostname + ":" + e.port + e.path), "function" == typeof e.transformWsUrl && (n = e.transformWsUrl(n, e, t)), n; }(t, e); return (n = t.my).connectSocket({ url: f, protocols: l }), i = function () { var e = new s; return e._write = function (e, t, r) { n.sendSocketMessage({ data: e.buffer, success: function () { r(); }, fail: function () { r(new Error); } }); }, e._flush = function (e) { n.closeSocket({ success: function () { e(); } }); }, e; }(), o = a.obj(), c || (c = !0, n.onSocketOpen(function () { o.setReadable(i), o.setWritable(i), o.emit("connect"); }), n.onSocketMessage(function (e) { if ("string" == typeof e.data) {
|
207
|
+
var t = u.toByteArray(e.data), n = r.from(t);
|
208
|
+
i.push(n);
|
209
|
+
}
|
210
|
+
else {
|
211
|
+
var o = new FileReader;
|
212
|
+
o.addEventListener("load", function () { var e = o.result; e = e instanceof ArrayBuffer ? r.from(e) : r.from(e, "utf8"), i.push(e); }), o.readAsArrayBuffer(e.data);
|
213
|
+
} }), n.onSocketClose(function () { o.end(), o.destroy(); }), n.onSocketError(function (e) { o.destroy(e); })), o; };
|
214
|
+
}).call(this, e("buffer").Buffer); }, { "base64-js": 10, buffer: 12, duplexify: 19, "readable-stream": 116 }], 3: [function (e, t, r) {
|
215
|
+
"use strict";
|
216
|
+
var n = e("net"), i = e("debug")("mqttjs:tcp");
|
217
|
+
t.exports = function (e, t) { var r, o; return t.port = t.port || 1883, t.hostname = t.hostname || t.host || "localhost", r = t.port, o = t.hostname, i("port %d and host %s", r, o), n.createConnection(r, o); };
|
218
|
+
}, { debug: 17, net: 11 }], 4: [function (e, t, r) {
|
219
|
+
"use strict";
|
220
|
+
var n = e("tls"), i = e("debug")("mqttjs:tls");
|
221
|
+
t.exports = function (e, t) { var r; function o(n) { t.rejectUnauthorized && e.emit("error", n), r.end(); } return t.port = t.port || 8883, t.host = t.hostname || t.host || "localhost", t.servername = t.host, t.rejectUnauthorized = !1 !== t.rejectUnauthorized, delete t.path, i("port %d host %s rejectUnauthorized %b", t.port, t.host, t.rejectUnauthorized), (r = n.connect(t)).on("secureConnect", function () { t.rejectUnauthorized && !r.authorized ? r.emit("error", new Error("TLS not authorized")) : r.removeListener("error", o); }), r.on("error", o), r; };
|
222
|
+
}, { debug: 17, tls: 11 }], 5: [function (e, t, r) { (function (r) {
|
223
|
+
"use strict";
|
224
|
+
var n = e("debug")("mqttjs:ws"), i = e("websocket-stream"), o = e("url"), s = ["rejectUnauthorized", "ca", "cert", "key", "pfx", "passphrase"], a = "browser" === r.title;
|
225
|
+
function u(e, t) { n("createWebSocket"); var r = "MQIsdp" === t.protocolId && 3 === t.protocolVersion ? "mqttv3.1" : "mqtt"; !function (e) { e.hostname || (e.hostname = "localhost"), e.port || ("wss" === e.protocol ? e.port = 443 : e.port = 80), e.path || (e.path = "/"), e.wsOptions || (e.wsOptions = {}), a || "wss" !== e.protocol || s.forEach(function (t) { e.hasOwnProperty(t) && !e.wsOptions.hasOwnProperty(t) && (e.wsOptions[t] = e[t]); }); }(t); var o = function (e, t) { var r = e.protocol + "://" + e.hostname + ":" + e.port + e.path; return "function" == typeof e.transformWsUrl && (r = e.transformWsUrl(r, e, t)), r; }(t, e); return n("url %s protocol %s", o, r), i(o, [r], t.wsOptions); }
|
226
|
+
t.exports = a ? function (e, t) { if (n("browserStreamBuilder"), t.hostname || (t.hostname = t.host), !t.hostname) {
|
227
|
+
if ("undefined" == typeof document)
|
228
|
+
throw new Error("Could not determine host. Specify host manually.");
|
229
|
+
var r = o.parse(document.URL);
|
230
|
+
t.hostname = r.hostname, t.port || (t.port = r.port);
|
231
|
+
} return u(e, t); } : function (e, t) { return u(e, t); };
|
232
|
+
}).call(this, e("_process")); }, { _process: 100, debug: 17, url: 132, "websocket-stream": 137 }], 6: [function (e, t, r) { (function (r, n) {
|
233
|
+
"use strict";
|
234
|
+
var i, o, s, a = e("readable-stream").Transform, u = e("duplexify");
|
235
|
+
t.exports = function (e, t) { if (t.hostname = t.hostname || t.host, !t.hostname)
|
236
|
+
throw new Error("Could not determine host. Specify host manually."); var c = "MQIsdp" === t.protocolId && 3 === t.protocolVersion ? "mqttv3.1" : "mqtt"; !function (e) { e.hostname || (e.hostname = "localhost"), e.path || (e.path = "/"), e.wsOptions || (e.wsOptions = {}); }(t); var l = function (e, t) { var r = "wxs" === e.protocol ? "wss" : "ws", n = r + "://" + e.hostname + e.path; return e.port && 80 !== e.port && 443 !== e.port && (n = r + "://" + e.hostname + ":" + e.port + e.path), "function" == typeof e.transformWsUrl && (n = e.transformWsUrl(n, e, t)), n; }(t, e); i = wx.connectSocket({ url: l, protocols: [c] }), o = function () { var e = new a; return e._write = function (e, t, r) { i.send({ data: e.buffer, success: function () { r(); }, fail: function (e) { r(new Error(e)); } }); }, e._flush = function (e) { i.close({ success: function () { e(); } }); }, e; }(), (s = u.obj())._destroy = function (e, t) { i.close({ success: function () { t && t(e); } }); }; var f = s.destroy; return s.destroy = function () { s.destroy = f; var e = this; r.nextTick(function () { i.close({ fail: function () { e._destroy(new Error); } }); }); }.bind(s), i.onOpen(function () { s.setReadable(o), s.setWritable(o), s.emit("connect"); }), i.onMessage(function (e) { var t = e.data; t = t instanceof ArrayBuffer ? n.from(t) : n.from(t, "utf8"), o.push(t); }), i.onClose(function () { s.end(), s.destroy(); }), i.onError(function (e) { s.destroy(new Error(e.errMsg)); }), s; };
|
237
|
+
}).call(this, e("_process"), e("buffer").Buffer); }, { _process: 100, buffer: 12, duplexify: 19, "readable-stream": 116 }], 7: [function (e, t, r) { (function (r) {
|
238
|
+
"use strict";
|
239
|
+
var n = e("xtend"), i = e("readable-stream").Readable, o = { objectMode: !0 }, s = { clean: !0 }, a = e("es6-map");
|
240
|
+
function u(e) { if (!(this instanceof u))
|
241
|
+
return new u(e); this.options = e || {}, this.options = n(s, e), this._inflights = new a; }
|
242
|
+
u.prototype.put = function (e, t) { return this._inflights.set(e.messageId, e), t && t(), this; }, u.prototype.createStream = function () { var e = new i(o), t = !1, n = [], s = 0; return this._inflights.forEach(function (e, t) { n.push(e); }), e._read = function () { !t && s < n.length ? this.push(n[s++]) : this.push(null); }, e.destroy = function () { if (!t) {
|
243
|
+
var e = this;
|
244
|
+
t = !0, r.nextTick(function () { e.emit("close"); });
|
245
|
+
} }, e; }, u.prototype.del = function (e, t) { return (e = this._inflights.get(e.messageId)) ? (this._inflights.delete(e.messageId), t(null, e)) : t && t(new Error("missing packet")), this; }, u.prototype.get = function (e, t) { return (e = this._inflights.get(e.messageId)) ? t(null, e) : t && t(new Error("missing packet")), this; }, u.prototype.close = function (e) { this.options.clean && (this._inflights = null), e && e(); }, t.exports = u;
|
246
|
+
}).call(this, e("_process")); }, { _process: 100, "es6-map": 68, "readable-stream": 116, xtend: 140 }], 8: [function (e, t, r) {
|
247
|
+
"use strict";
|
248
|
+
function n(e) { for (var t = e.split("/"), r = 0; r < t.length; r++)
|
249
|
+
if ("+" !== t[r]) {
|
250
|
+
if ("#" === t[r])
|
251
|
+
return r === t.length - 1;
|
252
|
+
if (-1 !== t[r].indexOf("+") || -1 !== t[r].indexOf("#"))
|
253
|
+
return !1;
|
254
|
+
} return !0; }
|
255
|
+
t.exports = { validateTopics: function (e) { if (0 === e.length)
|
256
|
+
return "empty_topic_list"; for (var t = 0; t < e.length; t++)
|
257
|
+
if (!n(e[t]))
|
258
|
+
return e[t]; return null; } };
|
259
|
+
}, {}], 9: [function (e, t, r) { (function (r) {
|
260
|
+
"use strict";
|
261
|
+
var n = e("../client"), i = e("../store"), o = e("url"), s = e("xtend"), a = e("debug")("mqttjs"), u = {};
|
262
|
+
function c(e, t) { if (a("connecting to an MQTT broker..."), "object" != typeof e || t || (t = e, e = null), t = t || {}, e) {
|
263
|
+
var r = o.parse(e, !0);
|
264
|
+
if (null != r.port && (r.port = Number(r.port)), null === (t = s(r, t)).protocol)
|
265
|
+
throw new Error("Missing protocol");
|
266
|
+
t.protocol = t.protocol.replace(/:$/, "");
|
267
|
+
} if (function (e) { var t; e.auth && ((t = e.auth.match(/^(.+):(.+)$/)) ? (e.username = t[1], e.password = t[2]) : e.username = e.auth); }(t), t.query && "string" == typeof t.query.clientId && (t.clientId = t.query.clientId), t.cert && t.key) {
|
268
|
+
if (!t.protocol)
|
269
|
+
throw new Error("Missing secure protocol key");
|
270
|
+
if (-1 === ["mqtts", "wss", "wxs", "alis"].indexOf(t.protocol))
|
271
|
+
switch (t.protocol) {
|
272
|
+
case "mqtt":
|
273
|
+
t.protocol = "mqtts";
|
274
|
+
break;
|
275
|
+
case "ws":
|
276
|
+
t.protocol = "wss";
|
277
|
+
break;
|
278
|
+
case "wx":
|
279
|
+
t.protocol = "wxs";
|
280
|
+
break;
|
281
|
+
case "ali":
|
282
|
+
t.protocol = "alis";
|
283
|
+
break;
|
284
|
+
default: throw new Error('Unknown protocol for secure connection: "' + t.protocol + '"!');
|
285
|
+
}
|
286
|
+
} if (!u[t.protocol]) {
|
287
|
+
var i = -1 !== ["mqtts", "wss"].indexOf(t.protocol);
|
288
|
+
t.protocol = ["mqtt", "mqtts", "ws", "wss", "wx", "wxs", "ali", "alis"].filter(function (e, t) { return (!i || t % 2 != 0) && "function" == typeof u[e]; })[0];
|
289
|
+
} if (!1 === t.clean && !t.clientId)
|
290
|
+
throw new Error("Missing clientId for unclean clients"); t.protocol && (t.defaultProtocol = t.protocol); var c = new n(function (e) { return t.servers && (e._reconnectCount && e._reconnectCount !== t.servers.length || (e._reconnectCount = 0), t.host = t.servers[e._reconnectCount].host, t.port = t.servers[e._reconnectCount].port, t.protocol = t.servers[e._reconnectCount].protocol ? t.servers[e._reconnectCount].protocol : t.defaultProtocol, t.hostname = t.host, e._reconnectCount++), a("calling streambuilder for", t.protocol), u[t.protocol](e, t); }, t); return c.on("error", function () { }), c; }
|
291
|
+
"browser" !== r.title ? (u.mqtt = e("./tcp"), u.tcp = e("./tcp"), u.ssl = e("./tls"), u.tls = e("./tls"), u.mqtts = e("./tls")) : (u.wx = e("./wx"), u.wxs = e("./wx"), u.ali = e("./ali"), u.alis = e("./ali")), u.ws = e("./ws"), u.wss = e("./ws"), t.exports = c, t.exports.connect = c, t.exports.MqttClient = n, t.exports.Store = i;
|
292
|
+
}).call(this, e("_process")); }, { "../client": 1, "../store": 7, "./ali": 2, "./tcp": 3, "./tls": 4, "./ws": 5, "./wx": 6, _process: 100, debug: 17, url: 132, xtend: 140 }], 10: [function (e, t, r) {
|
293
|
+
"use strict";
|
294
|
+
r.byteLength = function (e) { var t = c(e), r = t[0], n = t[1]; return 3 * (r + n) / 4 - n; }, r.toByteArray = function (e) { for (var t, r = c(e), n = r[0], s = r[1], a = new o(function (e, t, r) { return 3 * (t + r) / 4 - r; }(0, n, s)), u = 0, l = s > 0 ? n - 4 : n, f = 0; f < l; f += 4)
|
295
|
+
t = i[e.charCodeAt(f)] << 18 | i[e.charCodeAt(f + 1)] << 12 | i[e.charCodeAt(f + 2)] << 6 | i[e.charCodeAt(f + 3)], a[u++] = t >> 16 & 255, a[u++] = t >> 8 & 255, a[u++] = 255 & t; 2 === s && (t = i[e.charCodeAt(f)] << 2 | i[e.charCodeAt(f + 1)] >> 4, a[u++] = 255 & t); 1 === s && (t = i[e.charCodeAt(f)] << 10 | i[e.charCodeAt(f + 1)] << 4 | i[e.charCodeAt(f + 2)] >> 2, a[u++] = t >> 8 & 255, a[u++] = 255 & t); return a; }, r.fromByteArray = function (e) { for (var t, r = e.length, i = r % 3, o = [], s = 0, a = r - i; s < a; s += 16383)
|
296
|
+
o.push(l(e, s, s + 16383 > a ? a : s + 16383)); 1 === i ? (t = e[r - 1], o.push(n[t >> 2] + n[t << 4 & 63] + "==")) : 2 === i && (t = (e[r - 2] << 8) + e[r - 1], o.push(n[t >> 10] + n[t >> 4 & 63] + n[t << 2 & 63] + "=")); return o.join(""); };
|
297
|
+
for (var n = [], i = [], o = "undefined" != typeof Uint8Array ? Uint8Array : Array, s = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", a = 0, u = s.length; a < u; ++a)
|
298
|
+
n[a] = s[a], i[s.charCodeAt(a)] = a;
|
299
|
+
function c(e) { var t = e.length; if (t % 4 > 0)
|
300
|
+
throw new Error("Invalid string. Length must be a multiple of 4"); var r = e.indexOf("="); return -1 === r && (r = t), [r, r === t ? 0 : 4 - r % 4]; }
|
301
|
+
function l(e, t, r) { for (var i, o, s = [], a = t; a < r; a += 3)
|
302
|
+
i = (e[a] << 16 & 16711680) + (e[a + 1] << 8 & 65280) + (255 & e[a + 2]), s.push(n[(o = i) >> 18 & 63] + n[o >> 12 & 63] + n[o >> 6 & 63] + n[63 & o]); return s.join(""); }
|
303
|
+
i["-".charCodeAt(0)] = 62, i["_".charCodeAt(0)] = 63;
|
304
|
+
}, {}], 11: [function (e, t, r) { }, {}], 12: [function (e, t, r) { (function (t) {
|
305
|
+
"use strict";
|
306
|
+
var n = e("base64-js"), i = e("ieee754");
|
307
|
+
r.Buffer = t, r.SlowBuffer = function (e) { +e != e && (e = 0); return t.alloc(+e); }, r.INSPECT_MAX_BYTES = 50;
|
308
|
+
var o = 2147483647;
|
309
|
+
function s(e) { if (e > o)
|
310
|
+
throw new RangeError('The value "' + e + '" is invalid for option "size"'); var r = new Uint8Array(e); return r.__proto__ = t.prototype, r; }
|
311
|
+
function t(e, t, r) { if ("number" == typeof e) {
|
312
|
+
if ("string" == typeof t)
|
313
|
+
throw new TypeError('The "string" argument must be of type string. Received type number');
|
314
|
+
return c(e);
|
315
|
+
} return a(e, t, r); }
|
316
|
+
function a(e, r, n) { if ("string" == typeof e)
|
317
|
+
return function (e, r) { "string" == typeof r && "" !== r || (r = "utf8"); if (!t.isEncoding(r))
|
318
|
+
throw new TypeError("Unknown encoding: " + r); var n = 0 | p(e, r), i = s(n), o = i.write(e, r); o !== n && (i = i.slice(0, o)); return i; }(e, r); if (ArrayBuffer.isView(e))
|
319
|
+
return l(e); if (null == e)
|
320
|
+
throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof e); if (q(e, ArrayBuffer) || e && q(e.buffer, ArrayBuffer))
|
321
|
+
return function (e, r, n) { if (r < 0 || e.byteLength < r)
|
322
|
+
throw new RangeError('"offset" is outside of buffer bounds'); if (e.byteLength < r + (n || 0))
|
323
|
+
throw new RangeError('"length" is outside of buffer bounds'); var i; i = void 0 === r && void 0 === n ? new Uint8Array(e) : void 0 === n ? new Uint8Array(e, r) : new Uint8Array(e, r, n); return i.__proto__ = t.prototype, i; }(e, r, n); if ("number" == typeof e)
|
324
|
+
throw new TypeError('The "value" argument must not be of type number. Received type number'); var i = e.valueOf && e.valueOf(); if (null != i && i !== e)
|
325
|
+
return t.from(i, r, n); var o = function (e) { if (t.isBuffer(e)) {
|
326
|
+
var r = 0 | f(e.length), n = s(r);
|
327
|
+
return 0 === n.length ? n : (e.copy(n, 0, 0, r), n);
|
328
|
+
} if (void 0 !== e.length)
|
329
|
+
return "number" != typeof e.length || F(e.length) ? s(0) : l(e); if ("Buffer" === e.type && Array.isArray(e.data))
|
330
|
+
return l(e.data); }(e); if (o)
|
331
|
+
return o; if ("undefined" != typeof Symbol && null != Symbol.toPrimitive && "function" == typeof e[Symbol.toPrimitive])
|
332
|
+
return t.from(e[Symbol.toPrimitive]("string"), r, n); throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof e); }
|
333
|
+
function u(e) { if ("number" != typeof e)
|
334
|
+
throw new TypeError('"size" argument must be of type number'); if (e < 0)
|
335
|
+
throw new RangeError('The value "' + e + '" is invalid for option "size"'); }
|
336
|
+
function c(e) { return u(e), s(e < 0 ? 0 : 0 | f(e)); }
|
337
|
+
function l(e) { for (var t = e.length < 0 ? 0 : 0 | f(e.length), r = s(t), n = 0; n < t; n += 1)
|
338
|
+
r[n] = 255 & e[n]; return r; }
|
339
|
+
function f(e) { if (e >= o)
|
340
|
+
throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + o.toString(16) + " bytes"); return 0 | e; }
|
341
|
+
function p(e, r) { if (t.isBuffer(e))
|
342
|
+
return e.length; if (ArrayBuffer.isView(e) || q(e, ArrayBuffer))
|
343
|
+
return e.byteLength; if ("string" != typeof e)
|
344
|
+
throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof e); var n = e.length, i = arguments.length > 2 && !0 === arguments[2]; if (!i && 0 === n)
|
345
|
+
return 0; for (var o = !1;;)
|
346
|
+
switch (r) {
|
347
|
+
case "ascii":
|
348
|
+
case "latin1":
|
349
|
+
case "binary": return n;
|
350
|
+
case "utf8":
|
351
|
+
case "utf-8": return U(e).length;
|
352
|
+
case "ucs2":
|
353
|
+
case "ucs-2":
|
354
|
+
case "utf16le":
|
355
|
+
case "utf-16le": return 2 * n;
|
356
|
+
case "hex": return n >>> 1;
|
357
|
+
case "base64": return N(e).length;
|
358
|
+
default:
|
359
|
+
if (o)
|
360
|
+
return i ? -1 : U(e).length;
|
361
|
+
r = ("" + r).toLowerCase(), o = !0;
|
362
|
+
} }
|
363
|
+
function h(e, t, r) { var n = e[t]; e[t] = e[r], e[r] = n; }
|
364
|
+
function d(e, r, n, i, o) { if (0 === e.length)
|
365
|
+
return -1; if ("string" == typeof n ? (i = n, n = 0) : n > 2147483647 ? n = 2147483647 : n < -2147483648 && (n = -2147483648), F(n = +n) && (n = o ? 0 : e.length - 1), n < 0 && (n = e.length + n), n >= e.length) {
|
366
|
+
if (o)
|
367
|
+
return -1;
|
368
|
+
n = e.length - 1;
|
369
|
+
}
|
370
|
+
else if (n < 0) {
|
371
|
+
if (!o)
|
372
|
+
return -1;
|
373
|
+
n = 0;
|
374
|
+
} if ("string" == typeof r && (r = t.from(r, i)), t.isBuffer(r))
|
375
|
+
return 0 === r.length ? -1 : g(e, r, n, i, o); if ("number" == typeof r)
|
376
|
+
return r &= 255, "function" == typeof Uint8Array.prototype.indexOf ? o ? Uint8Array.prototype.indexOf.call(e, r, n) : Uint8Array.prototype.lastIndexOf.call(e, r, n) : g(e, [r], n, i, o); throw new TypeError("val must be string, number or Buffer"); }
|
377
|
+
function g(e, t, r, n, i) { var o, s = 1, a = e.length, u = t.length; if (void 0 !== n && ("ucs2" === (n = String(n).toLowerCase()) || "ucs-2" === n || "utf16le" === n || "utf-16le" === n)) {
|
378
|
+
if (e.length < 2 || t.length < 2)
|
379
|
+
return -1;
|
380
|
+
s = 2, a /= 2, u /= 2, r /= 2;
|
381
|
+
} function c(e, t) { return 1 === s ? e[t] : e.readUInt16BE(t * s); } if (i) {
|
382
|
+
var l = -1;
|
383
|
+
for (o = r; o < a; o++)
|
384
|
+
if (c(e, o) === c(t, -1 === l ? 0 : o - l)) {
|
385
|
+
if (-1 === l && (l = o), o - l + 1 === u)
|
386
|
+
return l * s;
|
387
|
+
}
|
388
|
+
else
|
389
|
+
-1 !== l && (o -= o - l), l = -1;
|
390
|
+
}
|
391
|
+
else
|
392
|
+
for (r + u > a && (r = a - u), o = r; o >= 0; o--) {
|
393
|
+
for (var f = !0, p = 0; p < u; p++)
|
394
|
+
if (c(e, o + p) !== c(t, p)) {
|
395
|
+
f = !1;
|
396
|
+
break;
|
397
|
+
}
|
398
|
+
if (f)
|
399
|
+
return o;
|
400
|
+
} return -1; }
|
401
|
+
function b(e, t, r, n) { r = Number(r) || 0; var i = e.length - r; n ? (n = Number(n)) > i && (n = i) : n = i; var o = t.length; n > o / 2 && (n = o / 2); for (var s = 0; s < n; ++s) {
|
402
|
+
var a = parseInt(t.substr(2 * s, 2), 16);
|
403
|
+
if (F(a))
|
404
|
+
return s;
|
405
|
+
e[r + s] = a;
|
406
|
+
} return s; }
|
407
|
+
function y(e, t, r, n) { return L(U(t, e.length - r), e, r, n); }
|
408
|
+
function m(e, t, r, n) { return L(function (e) { for (var t = [], r = 0; r < e.length; ++r)
|
409
|
+
t.push(255 & e.charCodeAt(r)); return t; }(t), e, r, n); }
|
410
|
+
function _(e, t, r, n) { return m(e, t, r, n); }
|
411
|
+
function v(e, t, r, n) { return L(N(t), e, r, n); }
|
412
|
+
function w(e, t, r, n) { return L(function (e, t) { for (var r, n, i, o = [], s = 0; s < e.length && !((t -= 2) < 0); ++s)
|
413
|
+
r = e.charCodeAt(s), n = r >> 8, i = r % 256, o.push(i), o.push(n); return o; }(t, e.length - r), e, r, n); }
|
414
|
+
function S(e, t, r) { return 0 === t && r === e.length ? n.fromByteArray(e) : n.fromByteArray(e.slice(t, r)); }
|
415
|
+
function x(e, t, r) { r = Math.min(e.length, r); for (var n = [], i = t; i < r;) {
|
416
|
+
var o, s, a, u, c = e[i], l = null, f = c > 239 ? 4 : c > 223 ? 3 : c > 191 ? 2 : 1;
|
417
|
+
if (i + f <= r)
|
418
|
+
switch (f) {
|
419
|
+
case 1:
|
420
|
+
c < 128 && (l = c);
|
421
|
+
break;
|
422
|
+
case 2:
|
423
|
+
128 == (192 & (o = e[i + 1])) && (u = (31 & c) << 6 | 63 & o) > 127 && (l = u);
|
424
|
+
break;
|
425
|
+
case 3:
|
426
|
+
o = e[i + 1], s = e[i + 2], 128 == (192 & o) && 128 == (192 & s) && (u = (15 & c) << 12 | (63 & o) << 6 | 63 & s) > 2047 && (u < 55296 || u > 57343) && (l = u);
|
427
|
+
break;
|
428
|
+
case 4: o = e[i + 1], s = e[i + 2], a = e[i + 3], 128 == (192 & o) && 128 == (192 & s) && 128 == (192 & a) && (u = (15 & c) << 18 | (63 & o) << 12 | (63 & s) << 6 | 63 & a) > 65535 && u < 1114112 && (l = u);
|
429
|
+
}
|
430
|
+
null === l ? (l = 65533, f = 1) : l > 65535 && (l -= 65536, n.push(l >>> 10 & 1023 | 55296), l = 56320 | 1023 & l), n.push(l), i += f;
|
431
|
+
} return function (e) { var t = e.length; if (t <= k)
|
432
|
+
return String.fromCharCode.apply(String, e); var r = "", n = 0; for (; n < t;)
|
433
|
+
r += String.fromCharCode.apply(String, e.slice(n, n += k)); return r; }(n); }
|
434
|
+
r.kMaxLength = o, t.TYPED_ARRAY_SUPPORT = function () { try {
|
435
|
+
var e = new Uint8Array(1);
|
436
|
+
return e.__proto__ = { __proto__: Uint8Array.prototype, foo: function () { return 42; } }, 42 === e.foo();
|
437
|
+
}
|
438
|
+
catch (e) {
|
439
|
+
return !1;
|
440
|
+
} }(), t.TYPED_ARRAY_SUPPORT || "undefined" == typeof console || "function" != typeof console.error || console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."), Object.defineProperty(t.prototype, "parent", { enumerable: !0, get: function () { if (t.isBuffer(this))
|
441
|
+
return this.buffer; } }), Object.defineProperty(t.prototype, "offset", { enumerable: !0, get: function () { if (t.isBuffer(this))
|
442
|
+
return this.byteOffset; } }), "undefined" != typeof Symbol && null != Symbol.species && t[Symbol.species] === t && Object.defineProperty(t, Symbol.species, { value: null, configurable: !0, enumerable: !1, writable: !1 }), t.poolSize = 8192, t.from = function (e, t, r) { return a(e, t, r); }, t.prototype.__proto__ = Uint8Array.prototype, t.__proto__ = Uint8Array, t.alloc = function (e, t, r) { return function (e, t, r) { return u(e), e <= 0 ? s(e) : void 0 !== t ? "string" == typeof r ? s(e).fill(t, r) : s(e).fill(t) : s(e); }(e, t, r); }, t.allocUnsafe = function (e) { return c(e); }, t.allocUnsafeSlow = function (e) { return c(e); }, t.isBuffer = function (e) { return null != e && !0 === e._isBuffer && e !== t.prototype; }, t.compare = function (e, r) { if (q(e, Uint8Array) && (e = t.from(e, e.offset, e.byteLength)), q(r, Uint8Array) && (r = t.from(r, r.offset, r.byteLength)), !t.isBuffer(e) || !t.isBuffer(r))
|
443
|
+
throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array'); if (e === r)
|
444
|
+
return 0; for (var n = e.length, i = r.length, o = 0, s = Math.min(n, i); o < s; ++o)
|
445
|
+
if (e[o] !== r[o]) {
|
446
|
+
n = e[o], i = r[o];
|
447
|
+
break;
|
448
|
+
} return n < i ? -1 : i < n ? 1 : 0; }, t.isEncoding = function (e) { switch (String(e).toLowerCase()) {
|
449
|
+
case "hex":
|
450
|
+
case "utf8":
|
451
|
+
case "utf-8":
|
452
|
+
case "ascii":
|
453
|
+
case "latin1":
|
454
|
+
case "binary":
|
455
|
+
case "base64":
|
456
|
+
case "ucs2":
|
457
|
+
case "ucs-2":
|
458
|
+
case "utf16le":
|
459
|
+
case "utf-16le": return !0;
|
460
|
+
default: return !1;
|
461
|
+
} }, t.concat = function (e, r) { if (!Array.isArray(e))
|
462
|
+
throw new TypeError('"list" argument must be an Array of Buffers'); if (0 === e.length)
|
463
|
+
return t.alloc(0); var n; if (void 0 === r)
|
464
|
+
for (r = 0, n = 0; n < e.length; ++n)
|
465
|
+
r += e[n].length; var i = t.allocUnsafe(r), o = 0; for (n = 0; n < e.length; ++n) {
|
466
|
+
var s = e[n];
|
467
|
+
if (q(s, Uint8Array) && (s = t.from(s)), !t.isBuffer(s))
|
468
|
+
throw new TypeError('"list" argument must be an Array of Buffers');
|
469
|
+
s.copy(i, o), o += s.length;
|
470
|
+
} return i; }, t.byteLength = p, t.prototype._isBuffer = !0, t.prototype.swap16 = function () { var e = this.length; if (e % 2 != 0)
|
471
|
+
throw new RangeError("Buffer size must be a multiple of 16-bits"); for (var t = 0; t < e; t += 2)
|
472
|
+
h(this, t, t + 1); return this; }, t.prototype.swap32 = function () { var e = this.length; if (e % 4 != 0)
|
473
|
+
throw new RangeError("Buffer size must be a multiple of 32-bits"); for (var t = 0; t < e; t += 4)
|
474
|
+
h(this, t, t + 3), h(this, t + 1, t + 2); return this; }, t.prototype.swap64 = function () { var e = this.length; if (e % 8 != 0)
|
475
|
+
throw new RangeError("Buffer size must be a multiple of 64-bits"); for (var t = 0; t < e; t += 8)
|
476
|
+
h(this, t, t + 7), h(this, t + 1, t + 6), h(this, t + 2, t + 5), h(this, t + 3, t + 4); return this; }, t.prototype.toString = function () { var e = this.length; return 0 === e ? "" : 0 === arguments.length ? x(this, 0, e) : function (e, t, r) { var n = !1; if ((void 0 === t || t < 0) && (t = 0), t > this.length)
|
477
|
+
return ""; if ((void 0 === r || r > this.length) && (r = this.length), r <= 0)
|
478
|
+
return ""; if ((r >>>= 0) <= (t >>>= 0))
|
479
|
+
return ""; for (e || (e = "utf8");;)
|
480
|
+
switch (e) {
|
481
|
+
case "hex": return C(this, t, r);
|
482
|
+
case "utf8":
|
483
|
+
case "utf-8": return x(this, t, r);
|
484
|
+
case "ascii": return E(this, t, r);
|
485
|
+
case "latin1":
|
486
|
+
case "binary": return I(this, t, r);
|
487
|
+
case "base64": return S(this, t, r);
|
488
|
+
case "ucs2":
|
489
|
+
case "ucs-2":
|
490
|
+
case "utf16le":
|
491
|
+
case "utf-16le": return O(this, t, r);
|
492
|
+
default:
|
493
|
+
if (n)
|
494
|
+
throw new TypeError("Unknown encoding: " + e);
|
495
|
+
e = (e + "").toLowerCase(), n = !0;
|
496
|
+
} }.apply(this, arguments); }, t.prototype.toLocaleString = t.prototype.toString, t.prototype.equals = function (e) { if (!t.isBuffer(e))
|
497
|
+
throw new TypeError("Argument must be a Buffer"); return this === e || 0 === t.compare(this, e); }, t.prototype.inspect = function () { var e = "", t = r.INSPECT_MAX_BYTES; return e = this.toString("hex", 0, t).replace(/(.{2})/g, "$1 ").trim(), this.length > t && (e += " ... "), "<Buffer " + e + ">"; }, t.prototype.compare = function (e, r, n, i, o) { if (q(e, Uint8Array) && (e = t.from(e, e.offset, e.byteLength)), !t.isBuffer(e))
|
498
|
+
throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof e); if (void 0 === r && (r = 0), void 0 === n && (n = e ? e.length : 0), void 0 === i && (i = 0), void 0 === o && (o = this.length), r < 0 || n > e.length || i < 0 || o > this.length)
|
499
|
+
throw new RangeError("out of range index"); if (i >= o && r >= n)
|
500
|
+
return 0; if (i >= o)
|
501
|
+
return -1; if (r >= n)
|
502
|
+
return 1; if (r >>>= 0, n >>>= 0, i >>>= 0, o >>>= 0, this === e)
|
503
|
+
return 0; for (var s = o - i, a = n - r, u = Math.min(s, a), c = this.slice(i, o), l = e.slice(r, n), f = 0; f < u; ++f)
|
504
|
+
if (c[f] !== l[f]) {
|
505
|
+
s = c[f], a = l[f];
|
506
|
+
break;
|
507
|
+
} return s < a ? -1 : a < s ? 1 : 0; }, t.prototype.includes = function (e, t, r) { return -1 !== this.indexOf(e, t, r); }, t.prototype.indexOf = function (e, t, r) { return d(this, e, t, r, !0); }, t.prototype.lastIndexOf = function (e, t, r) { return d(this, e, t, r, !1); }, t.prototype.write = function (e, t, r, n) { if (void 0 === t)
|
508
|
+
n = "utf8", r = this.length, t = 0;
|
509
|
+
else if (void 0 === r && "string" == typeof t)
|
510
|
+
n = t, r = this.length, t = 0;
|
511
|
+
else {
|
512
|
+
if (!isFinite(t))
|
513
|
+
throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");
|
514
|
+
t >>>= 0, isFinite(r) ? (r >>>= 0, void 0 === n && (n = "utf8")) : (n = r, r = void 0);
|
515
|
+
} var i = this.length - t; if ((void 0 === r || r > i) && (r = i), e.length > 0 && (r < 0 || t < 0) || t > this.length)
|
516
|
+
throw new RangeError("Attempt to write outside buffer bounds"); n || (n = "utf8"); for (var o = !1;;)
|
517
|
+
switch (n) {
|
518
|
+
case "hex": return b(this, e, t, r);
|
519
|
+
case "utf8":
|
520
|
+
case "utf-8": return y(this, e, t, r);
|
521
|
+
case "ascii": return m(this, e, t, r);
|
522
|
+
case "latin1":
|
523
|
+
case "binary": return _(this, e, t, r);
|
524
|
+
case "base64": return v(this, e, t, r);
|
525
|
+
case "ucs2":
|
526
|
+
case "ucs-2":
|
527
|
+
case "utf16le":
|
528
|
+
case "utf-16le": return w(this, e, t, r);
|
529
|
+
default:
|
530
|
+
if (o)
|
531
|
+
throw new TypeError("Unknown encoding: " + n);
|
532
|
+
n = ("" + n).toLowerCase(), o = !0;
|
533
|
+
} }, t.prototype.toJSON = function () { return { type: "Buffer", data: Array.prototype.slice.call(this._arr || this, 0) }; };
|
534
|
+
var k = 4096;
|
535
|
+
function E(e, t, r) { var n = ""; r = Math.min(e.length, r); for (var i = t; i < r; ++i)
|
536
|
+
n += String.fromCharCode(127 & e[i]); return n; }
|
537
|
+
function I(e, t, r) { var n = ""; r = Math.min(e.length, r); for (var i = t; i < r; ++i)
|
538
|
+
n += String.fromCharCode(e[i]); return n; }
|
539
|
+
function C(e, t, r) { var n = e.length; (!t || t < 0) && (t = 0), (!r || r < 0 || r > n) && (r = n); for (var i = "", o = t; o < r; ++o)
|
540
|
+
i += R(e[o]); return i; }
|
541
|
+
function O(e, t, r) { for (var n = e.slice(t, r), i = "", o = 0; o < n.length; o += 2)
|
542
|
+
i += String.fromCharCode(n[o] + 256 * n[o + 1]); return i; }
|
543
|
+
function j(e, t, r) { if (e % 1 != 0 || e < 0)
|
544
|
+
throw new RangeError("offset is not uint"); if (e + t > r)
|
545
|
+
throw new RangeError("Trying to access beyond buffer length"); }
|
546
|
+
function T(e, r, n, i, o, s) { if (!t.isBuffer(e))
|
547
|
+
throw new TypeError('"buffer" argument must be a Buffer instance'); if (r > o || r < s)
|
548
|
+
throw new RangeError('"value" argument is out of bounds'); if (n + i > e.length)
|
549
|
+
throw new RangeError("Index out of range"); }
|
550
|
+
function A(e, t, r, n, i, o) { if (r + n > e.length)
|
551
|
+
throw new RangeError("Index out of range"); if (r < 0)
|
552
|
+
throw new RangeError("Index out of range"); }
|
553
|
+
function P(e, t, r, n, o) { return t = +t, r >>>= 0, o || A(e, 0, r, 4), i.write(e, t, r, n, 23, 4), r + 4; }
|
554
|
+
function M(e, t, r, n, o) { return t = +t, r >>>= 0, o || A(e, 0, r, 8), i.write(e, t, r, n, 52, 8), r + 8; }
|
555
|
+
t.prototype.slice = function (e, r) { var n = this.length; e = ~~e, r = void 0 === r ? n : ~~r, e < 0 ? (e += n) < 0 && (e = 0) : e > n && (e = n), r < 0 ? (r += n) < 0 && (r = 0) : r > n && (r = n), r < e && (r = e); var i = this.subarray(e, r); return i.__proto__ = t.prototype, i; }, t.prototype.readUIntLE = function (e, t, r) { e >>>= 0, t >>>= 0, r || j(e, t, this.length); for (var n = this[e], i = 1, o = 0; ++o < t && (i *= 256);)
|
556
|
+
n += this[e + o] * i; return n; }, t.prototype.readUIntBE = function (e, t, r) { e >>>= 0, t >>>= 0, r || j(e, t, this.length); for (var n = this[e + --t], i = 1; t > 0 && (i *= 256);)
|
557
|
+
n += this[e + --t] * i; return n; }, t.prototype.readUInt8 = function (e, t) { return e >>>= 0, t || j(e, 1, this.length), this[e]; }, t.prototype.readUInt16LE = function (e, t) { return e >>>= 0, t || j(e, 2, this.length), this[e] | this[e + 1] << 8; }, t.prototype.readUInt16BE = function (e, t) { return e >>>= 0, t || j(e, 2, this.length), this[e] << 8 | this[e + 1]; }, t.prototype.readUInt32LE = function (e, t) { return e >>>= 0, t || j(e, 4, this.length), (this[e] | this[e + 1] << 8 | this[e + 2] << 16) + 16777216 * this[e + 3]; }, t.prototype.readUInt32BE = function (e, t) { return e >>>= 0, t || j(e, 4, this.length), 16777216 * this[e] + (this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3]); }, t.prototype.readIntLE = function (e, t, r) { e >>>= 0, t >>>= 0, r || j(e, t, this.length); for (var n = this[e], i = 1, o = 0; ++o < t && (i *= 256);)
|
558
|
+
n += this[e + o] * i; return n >= (i *= 128) && (n -= Math.pow(2, 8 * t)), n; }, t.prototype.readIntBE = function (e, t, r) { e >>>= 0, t >>>= 0, r || j(e, t, this.length); for (var n = t, i = 1, o = this[e + --n]; n > 0 && (i *= 256);)
|
559
|
+
o += this[e + --n] * i; return o >= (i *= 128) && (o -= Math.pow(2, 8 * t)), o; }, t.prototype.readInt8 = function (e, t) { return e >>>= 0, t || j(e, 1, this.length), 128 & this[e] ? -1 * (255 - this[e] + 1) : this[e]; }, t.prototype.readInt16LE = function (e, t) { e >>>= 0, t || j(e, 2, this.length); var r = this[e] | this[e + 1] << 8; return 32768 & r ? 4294901760 | r : r; }, t.prototype.readInt16BE = function (e, t) { e >>>= 0, t || j(e, 2, this.length); var r = this[e + 1] | this[e] << 8; return 32768 & r ? 4294901760 | r : r; }, t.prototype.readInt32LE = function (e, t) { return e >>>= 0, t || j(e, 4, this.length), this[e] | this[e + 1] << 8 | this[e + 2] << 16 | this[e + 3] << 24; }, t.prototype.readInt32BE = function (e, t) { return e >>>= 0, t || j(e, 4, this.length), this[e] << 24 | this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3]; }, t.prototype.readFloatLE = function (e, t) { return e >>>= 0, t || j(e, 4, this.length), i.read(this, e, !0, 23, 4); }, t.prototype.readFloatBE = function (e, t) { return e >>>= 0, t || j(e, 4, this.length), i.read(this, e, !1, 23, 4); }, t.prototype.readDoubleLE = function (e, t) { return e >>>= 0, t || j(e, 8, this.length), i.read(this, e, !0, 52, 8); }, t.prototype.readDoubleBE = function (e, t) { return e >>>= 0, t || j(e, 8, this.length), i.read(this, e, !1, 52, 8); }, t.prototype.writeUIntLE = function (e, t, r, n) { (e = +e, t >>>= 0, r >>>= 0, n) || T(this, e, t, r, Math.pow(2, 8 * r) - 1, 0); var i = 1, o = 0; for (this[t] = 255 & e; ++o < r && (i *= 256);)
|
560
|
+
this[t + o] = e / i & 255; return t + r; }, t.prototype.writeUIntBE = function (e, t, r, n) { (e = +e, t >>>= 0, r >>>= 0, n) || T(this, e, t, r, Math.pow(2, 8 * r) - 1, 0); var i = r - 1, o = 1; for (this[t + i] = 255 & e; --i >= 0 && (o *= 256);)
|
561
|
+
this[t + i] = e / o & 255; return t + r; }, t.prototype.writeUInt8 = function (e, t, r) { return e = +e, t >>>= 0, r || T(this, e, t, 1, 255, 0), this[t] = 255 & e, t + 1; }, t.prototype.writeUInt16LE = function (e, t, r) { return e = +e, t >>>= 0, r || T(this, e, t, 2, 65535, 0), this[t] = 255 & e, this[t + 1] = e >>> 8, t + 2; }, t.prototype.writeUInt16BE = function (e, t, r) { return e = +e, t >>>= 0, r || T(this, e, t, 2, 65535, 0), this[t] = e >>> 8, this[t + 1] = 255 & e, t + 2; }, t.prototype.writeUInt32LE = function (e, t, r) { return e = +e, t >>>= 0, r || T(this, e, t, 4, 4294967295, 0), this[t + 3] = e >>> 24, this[t + 2] = e >>> 16, this[t + 1] = e >>> 8, this[t] = 255 & e, t + 4; }, t.prototype.writeUInt32BE = function (e, t, r) { return e = +e, t >>>= 0, r || T(this, e, t, 4, 4294967295, 0), this[t] = e >>> 24, this[t + 1] = e >>> 16, this[t + 2] = e >>> 8, this[t + 3] = 255 & e, t + 4; }, t.prototype.writeIntLE = function (e, t, r, n) { if (e = +e, t >>>= 0, !n) {
|
562
|
+
var i = Math.pow(2, 8 * r - 1);
|
563
|
+
T(this, e, t, r, i - 1, -i);
|
564
|
+
} var o = 0, s = 1, a = 0; for (this[t] = 255 & e; ++o < r && (s *= 256);)
|
565
|
+
e < 0 && 0 === a && 0 !== this[t + o - 1] && (a = 1), this[t + o] = (e / s >> 0) - a & 255; return t + r; }, t.prototype.writeIntBE = function (e, t, r, n) { if (e = +e, t >>>= 0, !n) {
|
566
|
+
var i = Math.pow(2, 8 * r - 1);
|
567
|
+
T(this, e, t, r, i - 1, -i);
|
568
|
+
} var o = r - 1, s = 1, a = 0; for (this[t + o] = 255 & e; --o >= 0 && (s *= 256);)
|
569
|
+
e < 0 && 0 === a && 0 !== this[t + o + 1] && (a = 1), this[t + o] = (e / s >> 0) - a & 255; return t + r; }, t.prototype.writeInt8 = function (e, t, r) { return e = +e, t >>>= 0, r || T(this, e, t, 1, 127, -128), e < 0 && (e = 255 + e + 1), this[t] = 255 & e, t + 1; }, t.prototype.writeInt16LE = function (e, t, r) { return e = +e, t >>>= 0, r || T(this, e, t, 2, 32767, -32768), this[t] = 255 & e, this[t + 1] = e >>> 8, t + 2; }, t.prototype.writeInt16BE = function (e, t, r) { return e = +e, t >>>= 0, r || T(this, e, t, 2, 32767, -32768), this[t] = e >>> 8, this[t + 1] = 255 & e, t + 2; }, t.prototype.writeInt32LE = function (e, t, r) { return e = +e, t >>>= 0, r || T(this, e, t, 4, 2147483647, -2147483648), this[t] = 255 & e, this[t + 1] = e >>> 8, this[t + 2] = e >>> 16, this[t + 3] = e >>> 24, t + 4; }, t.prototype.writeInt32BE = function (e, t, r) { return e = +e, t >>>= 0, r || T(this, e, t, 4, 2147483647, -2147483648), e < 0 && (e = 4294967295 + e + 1), this[t] = e >>> 24, this[t + 1] = e >>> 16, this[t + 2] = e >>> 8, this[t + 3] = 255 & e, t + 4; }, t.prototype.writeFloatLE = function (e, t, r) { return P(this, e, t, !0, r); }, t.prototype.writeFloatBE = function (e, t, r) { return P(this, e, t, !1, r); }, t.prototype.writeDoubleLE = function (e, t, r) { return M(this, e, t, !0, r); }, t.prototype.writeDoubleBE = function (e, t, r) { return M(this, e, t, !1, r); }, t.prototype.copy = function (e, r, n, i) { if (!t.isBuffer(e))
|
570
|
+
throw new TypeError("argument should be a Buffer"); if (n || (n = 0), i || 0 === i || (i = this.length), r >= e.length && (r = e.length), r || (r = 0), i > 0 && i < n && (i = n), i === n)
|
571
|
+
return 0; if (0 === e.length || 0 === this.length)
|
572
|
+
return 0; if (r < 0)
|
573
|
+
throw new RangeError("targetStart out of bounds"); if (n < 0 || n >= this.length)
|
574
|
+
throw new RangeError("Index out of range"); if (i < 0)
|
575
|
+
throw new RangeError("sourceEnd out of bounds"); i > this.length && (i = this.length), e.length - r < i - n && (i = e.length - r + n); var o = i - n; if (this === e && "function" == typeof Uint8Array.prototype.copyWithin)
|
576
|
+
this.copyWithin(r, n, i);
|
577
|
+
else if (this === e && n < r && r < i)
|
578
|
+
for (var s = o - 1; s >= 0; --s)
|
579
|
+
e[s + r] = this[s + n];
|
580
|
+
else
|
581
|
+
Uint8Array.prototype.set.call(e, this.subarray(n, i), r); return o; }, t.prototype.fill = function (e, r, n, i) { if ("string" == typeof e) {
|
582
|
+
if ("string" == typeof r ? (i = r, r = 0, n = this.length) : "string" == typeof n && (i = n, n = this.length), void 0 !== i && "string" != typeof i)
|
583
|
+
throw new TypeError("encoding must be a string");
|
584
|
+
if ("string" == typeof i && !t.isEncoding(i))
|
585
|
+
throw new TypeError("Unknown encoding: " + i);
|
586
|
+
if (1 === e.length) {
|
587
|
+
var o = e.charCodeAt(0);
|
588
|
+
("utf8" === i && o < 128 || "latin1" === i) && (e = o);
|
589
|
+
}
|
590
|
+
}
|
591
|
+
else
|
592
|
+
"number" == typeof e && (e &= 255); if (r < 0 || this.length < r || this.length < n)
|
593
|
+
throw new RangeError("Out of range index"); if (n <= r)
|
594
|
+
return this; var s; if (r >>>= 0, n = void 0 === n ? this.length : n >>> 0, e || (e = 0), "number" == typeof e)
|
595
|
+
for (s = r; s < n; ++s)
|
596
|
+
this[s] = e;
|
597
|
+
else {
|
598
|
+
var a = t.isBuffer(e) ? e : t.from(e, i), u = a.length;
|
599
|
+
if (0 === u)
|
600
|
+
throw new TypeError('The value "' + e + '" is invalid for argument "value"');
|
601
|
+
for (s = 0; s < n - r; ++s)
|
602
|
+
this[s + r] = a[s % u];
|
603
|
+
} return this; };
|
604
|
+
var B = /[^+/0-9A-Za-z-_]/g;
|
605
|
+
function R(e) { return e < 16 ? "0" + e.toString(16) : e.toString(16); }
|
606
|
+
function U(e, t) { var r; t = t || 1 / 0; for (var n = e.length, i = null, o = [], s = 0; s < n; ++s) {
|
607
|
+
if ((r = e.charCodeAt(s)) > 55295 && r < 57344) {
|
608
|
+
if (!i) {
|
609
|
+
if (r > 56319) {
|
610
|
+
(t -= 3) > -1 && o.push(239, 191, 189);
|
611
|
+
continue;
|
612
|
+
}
|
613
|
+
if (s + 1 === n) {
|
614
|
+
(t -= 3) > -1 && o.push(239, 191, 189);
|
615
|
+
continue;
|
616
|
+
}
|
617
|
+
i = r;
|
618
|
+
continue;
|
619
|
+
}
|
620
|
+
if (r < 56320) {
|
621
|
+
(t -= 3) > -1 && o.push(239, 191, 189), i = r;
|
622
|
+
continue;
|
623
|
+
}
|
624
|
+
r = 65536 + (i - 55296 << 10 | r - 56320);
|
625
|
+
}
|
626
|
+
else
|
627
|
+
i && (t -= 3) > -1 && o.push(239, 191, 189);
|
628
|
+
if (i = null, r < 128) {
|
629
|
+
if ((t -= 1) < 0)
|
630
|
+
break;
|
631
|
+
o.push(r);
|
632
|
+
}
|
633
|
+
else if (r < 2048) {
|
634
|
+
if ((t -= 2) < 0)
|
635
|
+
break;
|
636
|
+
o.push(r >> 6 | 192, 63 & r | 128);
|
637
|
+
}
|
638
|
+
else if (r < 65536) {
|
639
|
+
if ((t -= 3) < 0)
|
640
|
+
break;
|
641
|
+
o.push(r >> 12 | 224, r >> 6 & 63 | 128, 63 & r | 128);
|
642
|
+
}
|
643
|
+
else {
|
644
|
+
if (!(r < 1114112))
|
645
|
+
throw new Error("Invalid code point");
|
646
|
+
if ((t -= 4) < 0)
|
647
|
+
break;
|
648
|
+
o.push(r >> 18 | 240, r >> 12 & 63 | 128, r >> 6 & 63 | 128, 63 & r | 128);
|
649
|
+
}
|
650
|
+
} return o; }
|
651
|
+
function N(e) { return n.toByteArray(function (e) { if ((e = (e = e.split("=")[0]).trim().replace(B, "")).length < 2)
|
652
|
+
return ""; for (; e.length % 4 != 0;)
|
653
|
+
e += "="; return e; }(e)); }
|
654
|
+
function L(e, t, r, n) { for (var i = 0; i < n && !(i + r >= t.length || i >= e.length); ++i)
|
655
|
+
t[i + r] = e[i]; return i; }
|
656
|
+
function q(e, t) { return e instanceof t || null != e && null != e.constructor && null != e.constructor.name && e.constructor.name === t.name; }
|
657
|
+
function F(e) { return e != e; }
|
658
|
+
}).call(this, e("buffer").Buffer); }, { "base64-js": 10, buffer: 12, ieee754: 87 }], 13: [function (e, t, r) { (function (e) { function t(e) { return Object.prototype.toString.call(e); } r.isArray = function (e) { return Array.isArray ? Array.isArray(e) : "[object Array]" === t(e); }, r.isBoolean = function (e) { return "boolean" == typeof e; }, r.isNull = function (e) { return null === e; }, r.isNullOrUndefined = function (e) { return null == e; }, r.isNumber = function (e) { return "number" == typeof e; }, r.isString = function (e) { return "string" == typeof e; }, r.isSymbol = function (e) { return "symbol" == typeof e; }, r.isUndefined = function (e) { return void 0 === e; }, r.isRegExp = function (e) { return "[object RegExp]" === t(e); }, r.isObject = function (e) { return "object" == typeof e && null !== e; }, r.isDate = function (e) { return "[object Date]" === t(e); }, r.isError = function (e) { return "[object Error]" === t(e) || e instanceof Error; }, r.isFunction = function (e) { return "function" == typeof e; }, r.isPrimitive = function (e) { return null === e || "boolean" == typeof e || "number" == typeof e || "string" == typeof e || "symbol" == typeof e || void 0 === e; }, r.isBuffer = e.isBuffer; }).call(this, { isBuffer: e("../../is-buffer/index.js") }); }, { "../../is-buffer/index.js": 89 }], 14: [function (e, t, r) {
|
659
|
+
"use strict";
|
660
|
+
var n, i = e("type/value/is"), o = e("type/value/ensure"), s = e("type/plain-function/ensure"), a = e("es5-ext/object/copy"), u = e("es5-ext/object/normalize-options"), c = e("es5-ext/object/map"), l = Function.prototype.bind, f = Object.defineProperty, p = Object.prototype.hasOwnProperty;
|
661
|
+
n = function (e, t, r) { var n, i = o(t) && s(t.value); return delete (n = a(t)).writable, delete n.value, n.get = function () { return !r.overwriteDefinition && p.call(this, e) ? i : (t.value = l.call(i, r.resolveContext ? r.resolveContext(this) : this), f(this, e, t), this[e]); }, n; }, t.exports = function (e) { var t = u(arguments[1]); return i(t.resolveContext) && s(t.resolveContext), c(e, function (e, r) { return n(r, e, t); }); };
|
662
|
+
}, { "es5-ext/object/copy": 41, "es5-ext/object/map": 49, "es5-ext/object/normalize-options": 50, "type/plain-function/ensure": 126, "type/value/ensure": 130, "type/value/is": 131 }], 15: [function (e, t, r) {
|
663
|
+
"use strict";
|
664
|
+
var n = e("type/value/is"), i = e("type/plain-function/is"), o = e("es5-ext/object/assign"), s = e("es5-ext/object/normalize-options"), a = e("es5-ext/string/#/contains");
|
665
|
+
(t.exports = function (e, t) { var r, i, u, c, l; return arguments.length < 2 || "string" != typeof e ? (c = t, t = e, e = null) : c = arguments[2], n(e) ? (r = a.call(e, "c"), i = a.call(e, "e"), u = a.call(e, "w")) : (r = u = !0, i = !1), l = { value: t, configurable: r, enumerable: i, writable: u }, c ? o(s(c), l) : l; }).gs = function (e, t, r) { var u, c, l, f; return "string" != typeof e ? (l = r, r = t, t = e, e = null) : l = arguments[3], n(t) ? i(t) ? n(r) ? i(r) || (l = r, r = void 0) : r = void 0 : (l = t, t = r = void 0) : t = void 0, n(e) ? (u = a.call(e, "c"), c = a.call(e, "e")) : (u = !0, c = !1), f = { get: t, set: r, configurable: u, enumerable: c }, l ? o(s(l), f) : f; };
|
666
|
+
}, { "es5-ext/object/assign": 38, "es5-ext/object/normalize-options": 50, "es5-ext/string/#/contains": 57, "type/plain-function/is": 127, "type/value/is": 131 }], 16: [function (e, t, r) { var n = 1e3, i = 60 * n, o = 60 * i, s = 24 * o, a = 7 * s, u = 365.25 * s; function c(e, t, r, n) { var i = t >= 1.5 * r; return Math.round(e / r) + " " + n + (i ? "s" : ""); } t.exports = function (e, t) { t = t || {}; var r = typeof e; if ("string" === r && e.length > 0)
|
667
|
+
return function (e) { if ((e = String(e)).length > 100)
|
668
|
+
return; var t = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e); if (!t)
|
669
|
+
return; var r = parseFloat(t[1]); switch ((t[2] || "ms").toLowerCase()) {
|
670
|
+
case "years":
|
671
|
+
case "year":
|
672
|
+
case "yrs":
|
673
|
+
case "yr":
|
674
|
+
case "y": return r * u;
|
675
|
+
case "weeks":
|
676
|
+
case "week":
|
677
|
+
case "w": return r * a;
|
678
|
+
case "days":
|
679
|
+
case "day":
|
680
|
+
case "d": return r * s;
|
681
|
+
case "hours":
|
682
|
+
case "hour":
|
683
|
+
case "hrs":
|
684
|
+
case "hr":
|
685
|
+
case "h": return r * o;
|
686
|
+
case "minutes":
|
687
|
+
case "minute":
|
688
|
+
case "mins":
|
689
|
+
case "min":
|
690
|
+
case "m": return r * i;
|
691
|
+
case "seconds":
|
692
|
+
case "second":
|
693
|
+
case "secs":
|
694
|
+
case "sec":
|
695
|
+
case "s": return r * n;
|
696
|
+
case "milliseconds":
|
697
|
+
case "millisecond":
|
698
|
+
case "msecs":
|
699
|
+
case "msec":
|
700
|
+
case "ms": return r;
|
701
|
+
default: return;
|
702
|
+
} }(e); if ("number" === r && isFinite(e))
|
703
|
+
return t.long ? function (e) { var t = Math.abs(e); if (t >= s)
|
704
|
+
return c(e, t, s, "day"); if (t >= o)
|
705
|
+
return c(e, t, o, "hour"); if (t >= i)
|
706
|
+
return c(e, t, i, "minute"); if (t >= n)
|
707
|
+
return c(e, t, n, "second"); return e + " ms"; }(e) : function (e) { var t = Math.abs(e); if (t >= s)
|
708
|
+
return Math.round(e / s) + "d"; if (t >= o)
|
709
|
+
return Math.round(e / o) + "h"; if (t >= i)
|
710
|
+
return Math.round(e / i) + "m"; if (t >= n)
|
711
|
+
return Math.round(e / n) + "s"; return e + "ms"; }(e); throw new Error("val is not a non-empty string or a valid number. val=" + JSON.stringify(e)); }; }, {}], 17: [function (e, t, r) { (function (n) { r.log = function () {
|
712
|
+
var e = [];
|
713
|
+
for (var _a = 0; _a < arguments.length; _a++) {
|
714
|
+
e[_a] = arguments[_a];
|
715
|
+
}
|
716
|
+
return "object" == typeof console && console.log && console.log.apply(console, e);
|
717
|
+
}, r.formatArgs = function (e) { if (e[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + e[0] + (this.useColors ? "%c " : " ") + "+" + t.exports.humanize(this.diff), !this.useColors)
|
718
|
+
return; var r = "color: " + this.color; e.splice(1, 0, r, "color: inherit"); var n = 0, i = 0; e[0].replace(/%[a-zA-Z%]/g, function (e) { "%%" !== e && "%c" === e && (i = ++n); }), e.splice(i, 0, r); }, r.save = function (e) { try {
|
719
|
+
e ? r.storage.setItem("debug", e) : r.storage.removeItem("debug");
|
720
|
+
}
|
721
|
+
catch (e) { } }, r.load = function () { var e; try {
|
722
|
+
e = r.storage.getItem("debug");
|
723
|
+
}
|
724
|
+
catch (e) { } !e && void 0 !== n && "env" in n && (e = n.env.DEBUG); return e; }, r.useColors = function () { if ("undefined" != typeof window && window.process && ("renderer" === window.process.type || window.process.__nwjs))
|
725
|
+
return !0; if ("undefined" != typeof navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))
|
726
|
+
return !1; return "undefined" != typeof document && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || "undefined" != typeof window && window.console && (window.console.firebug || window.console.exception && window.console.table) || "undefined" != typeof navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || "undefined" != typeof navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/); }, r.storage = function () { try {
|
727
|
+
return localStorage;
|
728
|
+
}
|
729
|
+
catch (e) { } }(), r.colors = ["#0000CC", "#0000FF", "#0033CC", "#0033FF", "#0066CC", "#0066FF", "#0099CC", "#0099FF", "#00CC00", "#00CC33", "#00CC66", "#00CC99", "#00CCCC", "#00CCFF", "#3300CC", "#3300FF", "#3333CC", "#3333FF", "#3366CC", "#3366FF", "#3399CC", "#3399FF", "#33CC00", "#33CC33", "#33CC66", "#33CC99", "#33CCCC", "#33CCFF", "#6600CC", "#6600FF", "#6633CC", "#6633FF", "#66CC00", "#66CC33", "#9900CC", "#9900FF", "#9933CC", "#9933FF", "#99CC00", "#99CC33", "#CC0000", "#CC0033", "#CC0066", "#CC0099", "#CC00CC", "#CC00FF", "#CC3300", "#CC3333", "#CC3366", "#CC3399", "#CC33CC", "#CC33FF", "#CC6600", "#CC6633", "#CC9900", "#CC9933", "#CCCC00", "#CCCC33", "#FF0000", "#FF0033", "#FF0066", "#FF0099", "#FF00CC", "#FF00FF", "#FF3300", "#FF3333", "#FF3366", "#FF3399", "#FF33CC", "#FF33FF", "#FF6600", "#FF6633", "#FF9900", "#FF9933", "#FFCC00", "#FFCC33"], t.exports = e("./common")(r); var i = t.exports.formatters; i.j = function (e) { try {
|
730
|
+
return JSON.stringify(e);
|
731
|
+
}
|
732
|
+
catch (e) {
|
733
|
+
return "[UnexpectedJSONParseError]: " + e.message;
|
734
|
+
} }; }).call(this, e("_process")); }, { "./common": 18, _process: 100 }], 18: [function (e, t, r) { t.exports = function (t) { function r(e) { var t = 0; for (var r_1 = 0; r_1 < e.length; r_1++)
|
735
|
+
t = (t << 5) - t + e.charCodeAt(r_1), t |= 0; return n.colors[Math.abs(t) % n.colors.length]; } function n(e) { var t; function s() {
|
736
|
+
var e = [];
|
737
|
+
for (var _a = 0; _a < arguments.length; _a++) {
|
738
|
+
e[_a] = arguments[_a];
|
739
|
+
}
|
740
|
+
if (!s.enabled)
|
741
|
+
return;
|
742
|
+
var r = s, i = Number(new Date), o = i - (t || i);
|
743
|
+
r.diff = o, r.prev = t, r.curr = i, t = i, e[0] = n.coerce(e[0]), "string" != typeof e[0] && e.unshift("%O");
|
744
|
+
var a = 0;
|
745
|
+
e[0] = e[0].replace(/%([a-zA-Z%])/g, function (t, i) { if ("%%" === t)
|
746
|
+
return t; a++; var o = n.formatters[i]; if ("function" == typeof o) {
|
747
|
+
var n_1 = e[a];
|
748
|
+
t = o.call(r, n_1), e.splice(a, 1), a--;
|
749
|
+
} return t; }), n.formatArgs.call(r, e), (r.log || n.log).apply(r, e);
|
750
|
+
} return s.namespace = e, s.enabled = n.enabled(e), s.useColors = n.useColors(), s.color = r(e), s.destroy = i, s.extend = o, "function" == typeof n.init && n.init(s), n.instances.push(s), s; } function i() { var e = n.instances.indexOf(this); return -1 !== e && (n.instances.splice(e, 1), !0); } function o(e, t) { var r = n(this.namespace + (void 0 === t ? ":" : t) + e); return r.log = this.log, r; } function s(e) { return e.toString().substring(2, e.toString().length - 2).replace(/\.\*\?$/, "*"); } return n.debug = n, n.default = n, n.coerce = function (e) { return e instanceof Error ? e.stack || e.message : e; }, n.disable = function () { var e = __spreadArrays(n.names.map(s), n.skips.map(s).map(function (e) { return "-" + e; })).join(","); return n.enable(""), e; }, n.enable = function (e) { var t; n.save(e), n.names = [], n.skips = []; var r = ("string" == typeof e ? e : "").split(/[\s,]+/), i = r.length; for (t = 0; t < i; t++)
|
751
|
+
r[t] && ("-" === (e = r[t].replace(/\*/g, ".*?"))[0] ? n.skips.push(new RegExp("^" + e.substr(1) + "$")) : n.names.push(new RegExp("^" + e + "$"))); for (t = 0; t < n.instances.length; t++) {
|
752
|
+
var e_1 = n.instances[t];
|
753
|
+
e_1.enabled = n.enabled(e_1.namespace);
|
754
|
+
} }, n.enabled = function (e) { if ("*" === e[e.length - 1])
|
755
|
+
return !0; var t, r; for (t = 0, r = n.skips.length; t < r; t++)
|
756
|
+
if (n.skips[t].test(e))
|
757
|
+
return !1; for (t = 0, r = n.names.length; t < r; t++)
|
758
|
+
if (n.names[t].test(e))
|
759
|
+
return !0; return !1; }, n.humanize = e("ms"), Object.keys(t).forEach(function (e) { n[e] = t[e]; }), n.instances = [], n.names = [], n.skips = [], n.formatters = {}, n.selectColor = r, n.enable(n.load()), n; }; }, { ms: 16 }], 19: [function (e, t, r) { (function (r, n) { var i = e("readable-stream"), o = e("end-of-stream"), s = e("inherits"), a = e("stream-shift"), u = n.from && n.from !== Uint8Array.from ? n.from([0]) : new n([0]), c = function (e, t) { e._corked ? e.once("uncork", t) : t(); }, l = function (e, t) { return function (r) { r ? function (e, t) { e._autoDestroy && e.destroy(t); }(e, "premature close" === r.message ? null : r) : t && !e._ended && e.end(); }; }, f = function (e, t, r) { if (!(this instanceof f))
|
760
|
+
return new f(e, t, r); i.Duplex.call(this, r), this._writable = null, this._readable = null, this._readable2 = null, this._autoDestroy = !r || !1 !== r.autoDestroy, this._forwardDestroy = !r || !1 !== r.destroy, this._forwardEnd = !r || !1 !== r.end, this._corked = 1, this._ondrain = null, this._drained = !1, this._forwarding = !1, this._unwrite = null, this._unread = null, this._ended = !1, this.destroyed = !1, e && this.setWritable(e), t && this.setReadable(t); }; s(f, i.Duplex), f.obj = function (e, t, r) { return r || (r = {}), r.objectMode = !0, r.highWaterMark = 16, new f(e, t, r); }, f.prototype.cork = function () { 1 == ++this._corked && this.emit("cork"); }, f.prototype.uncork = function () { this._corked && 0 == --this._corked && this.emit("uncork"); }, f.prototype.setWritable = function (e) { if (this._unwrite && this._unwrite(), this.destroyed)
|
761
|
+
e && e.destroy && e.destroy();
|
762
|
+
else if (null !== e && !1 !== e) {
|
763
|
+
var t = this, n = o(e, { writable: !0, readable: !1 }, l(this, this._forwardEnd)), i = function () { var e = t._ondrain; t._ondrain = null, e && e(); };
|
764
|
+
this._unwrite && r.nextTick(i), this._writable = e, this._writable.on("drain", i), this._unwrite = function () { t._writable.removeListener("drain", i), n(); }, this.uncork();
|
765
|
+
}
|
766
|
+
else
|
767
|
+
this.end(); }, f.prototype.setReadable = function (e) { if (this._unread && this._unread(), this.destroyed)
|
768
|
+
e && e.destroy && e.destroy();
|
769
|
+
else {
|
770
|
+
if (null === e || !1 === e)
|
771
|
+
return this.push(null), void this.resume();
|
772
|
+
var t, r = this, n = o(e, { writable: !1, readable: !0 }, l(this)), s = function () { r._forward(); }, a = function () { r.push(null); };
|
773
|
+
this._drained = !0, this._readable = e, this._readable2 = e._readableState ? e : (t = e, new i.Readable({ objectMode: !0, highWaterMark: 16 }).wrap(t)), this._readable2.on("readable", s), this._readable2.on("end", a), this._unread = function () { r._readable2.removeListener("readable", s), r._readable2.removeListener("end", a), n(); }, this._forward();
|
774
|
+
} }, f.prototype._read = function () { this._drained = !0, this._forward(); }, f.prototype._forward = function () { if (!this._forwarding && this._readable2 && this._drained) {
|
775
|
+
var e;
|
776
|
+
for (this._forwarding = !0; this._drained && null !== (e = a(this._readable2));)
|
777
|
+
this.destroyed || (this._drained = this.push(e));
|
778
|
+
this._forwarding = !1;
|
779
|
+
} }, f.prototype.destroy = function (e) { if (!this.destroyed) {
|
780
|
+
this.destroyed = !0;
|
781
|
+
var t = this;
|
782
|
+
r.nextTick(function () { t._destroy(e); });
|
783
|
+
} }, f.prototype._destroy = function (e) { if (e) {
|
784
|
+
var t = this._ondrain;
|
785
|
+
this._ondrain = null, t ? t(e) : this.emit("error", e);
|
786
|
+
} this._forwardDestroy && (this._readable && this._readable.destroy && this._readable.destroy(), this._writable && this._writable.destroy && this._writable.destroy()), this.emit("close"); }, f.prototype._write = function (e, t, r) { return this.destroyed ? r() : this._corked ? c(this, this._write.bind(this, e, t, r)) : e === u ? this._finish(r) : this._writable ? void (!1 === this._writable.write(e) ? this._ondrain = r : r()) : r(); }, f.prototype._finish = function (e) { var t = this; this.emit("preend"), c(this, function () { var r, n; r = t._forwardEnd && t._writable, n = function () { !1 === t._writableState.prefinished && (t._writableState.prefinished = !0), t.emit("prefinish"), c(t, e); }, r ? r._writableState && r._writableState.finished ? n() : r._writableState ? r.end(n) : (r.end(), n()) : n(); }); }, f.prototype.end = function (e, t, r) { return "function" == typeof e ? this.end(null, null, e) : "function" == typeof t ? this.end(e, null, t) : (this._ended = !0, e && this.write(e), this._writableState.ending || this.write(u), i.Writable.prototype.end.call(this, r)); }, t.exports = f; }).call(this, e("_process"), e("buffer").Buffer); }, { _process: 100, buffer: 12, "end-of-stream": 20, inherits: 88, "readable-stream": 116, "stream-shift": 119 }], 20: [function (e, t, r) { var n = e("once"), i = function () { }, o = function (e, t, r) { if ("function" == typeof t)
|
787
|
+
return o(e, null, t); t || (t = {}), r = n(r || i); var s = e._writableState, a = e._readableState, u = t.readable || !1 !== t.readable && e.readable, c = t.writable || !1 !== t.writable && e.writable, l = function () { e.writable || f(); }, f = function () { c = !1, u || r.call(e); }, p = function () { u = !1, c || r.call(e); }, h = function (t) { r.call(e, t ? new Error("exited with error code: " + t) : null); }, d = function (t) { r.call(e, t); }, g = function () { return (!u || a && a.ended) && (!c || s && s.ended) ? void 0 : r.call(e, new Error("premature close")); }, b = function () { e.req.on("finish", f); }; return !function (e) { return e.setHeader && "function" == typeof e.abort; }(e) ? c && !s && (e.on("end", l), e.on("close", l)) : (e.on("complete", f), e.on("abort", g), e.req ? b() : e.on("request", b)), function (e) { return e.stdio && Array.isArray(e.stdio) && 3 === e.stdio.length; }(e) && e.on("exit", h), e.on("end", p), e.on("finish", f), !1 !== t.error && e.on("error", d), e.on("close", g), function () { e.removeListener("complete", f), e.removeListener("abort", g), e.removeListener("request", b), e.req && e.req.removeListener("finish", f), e.removeListener("end", l), e.removeListener("close", l), e.removeListener("finish", f), e.removeListener("exit", h), e.removeListener("end", p), e.removeListener("error", d), e.removeListener("close", g); }; }; t.exports = o; }, { once: 98 }], 21: [function (e, t, r) {
|
788
|
+
"use strict";
|
789
|
+
var n = e("../../object/valid-value");
|
790
|
+
t.exports = function () { return n(this).length = 0, this; };
|
791
|
+
}, { "../../object/valid-value": 56 }], 22: [function (e, t, r) {
|
792
|
+
"use strict";
|
793
|
+
var n = e("../../number/is-nan"), i = e("../../number/to-pos-integer"), o = e("../../object/valid-value"), s = Array.prototype.indexOf, a = Object.prototype.hasOwnProperty, u = Math.abs, c = Math.floor;
|
794
|
+
t.exports = function (e) { var t, r, l, f; if (!n(e))
|
795
|
+
return s.apply(this, arguments); for (r = i(o(this).length), l = arguments[1], t = l = isNaN(l) ? 0 : l >= 0 ? c(l) : i(this.length) - c(u(l)); t < r; ++t)
|
796
|
+
if (a.call(this, t) && (f = this[t], n(f)))
|
797
|
+
return t; return -1; };
|
798
|
+
}, { "../../number/is-nan": 32, "../../number/to-pos-integer": 36, "../../object/valid-value": 56 }], 23: [function (e, t, r) {
|
799
|
+
"use strict";
|
800
|
+
t.exports = e("./is-implemented")() ? Array.from : e("./shim");
|
801
|
+
}, { "./is-implemented": 24, "./shim": 25 }], 24: [function (e, t, r) {
|
802
|
+
"use strict";
|
803
|
+
t.exports = function () { var e, t, r = Array.from; return "function" == typeof r && (t = r(e = ["raz", "dwa"]), Boolean(t && t !== e && "dwa" === t[1])); };
|
804
|
+
}, {}], 25: [function (e, t, r) {
|
805
|
+
"use strict";
|
806
|
+
var n = e("es6-symbol").iterator, i = e("../../function/is-arguments"), o = e("../../function/is-function"), s = e("../../number/to-pos-integer"), a = e("../../object/valid-callable"), u = e("../../object/valid-value"), c = e("../../object/is-value"), l = e("../../string/is-string"), f = Array.isArray, p = Function.prototype.call, h = { configurable: !0, enumerable: !0, writable: !0, value: null }, d = Object.defineProperty;
|
807
|
+
t.exports = function (e) { var t, r, g, b, y, m, _, v, w, S, x = arguments[1], k = arguments[2]; if (e = Object(u(e)), c(x) && a(x), this && this !== Array && o(this))
|
808
|
+
t = this;
|
809
|
+
else {
|
810
|
+
if (!x) {
|
811
|
+
if (i(e))
|
812
|
+
return 1 !== (y = e.length) ? Array.apply(null, e) : ((b = new Array(1))[0] = e[0], b);
|
813
|
+
if (f(e)) {
|
814
|
+
for (b = new Array(y = e.length), r = 0; r < y; ++r)
|
815
|
+
b[r] = e[r];
|
816
|
+
return b;
|
817
|
+
}
|
818
|
+
}
|
819
|
+
b = [];
|
820
|
+
} if (!f(e))
|
821
|
+
if (void 0 !== (w = e[n])) {
|
822
|
+
for (_ = a(w).call(e), t && (b = new t), v = _.next(), r = 0; !v.done;)
|
823
|
+
S = x ? p.call(x, k, v.value, r) : v.value, t ? (h.value = S, d(b, r, h)) : b[r] = S, v = _.next(), ++r;
|
824
|
+
y = r;
|
825
|
+
}
|
826
|
+
else if (l(e)) {
|
827
|
+
for (y = e.length, t && (b = new t), r = 0, g = 0; r < y; ++r)
|
828
|
+
S = e[r], r + 1 < y && (m = S.charCodeAt(0)) >= 55296 && m <= 56319 && (S += e[++r]), S = x ? p.call(x, k, S, g) : S, t ? (h.value = S, d(b, g, h)) : b[g] = S, ++g;
|
829
|
+
y = g;
|
830
|
+
} if (void 0 === y)
|
831
|
+
for (y = s(e.length), t && (b = new t(y)), r = 0; r < y; ++r)
|
832
|
+
S = x ? p.call(x, k, e[r], r) : e[r], t ? (h.value = S, d(b, r, h)) : b[r] = S; return t && (h.value = null, b.length = y), b; };
|
833
|
+
}, { "../../function/is-arguments": 26, "../../function/is-function": 27, "../../number/to-pos-integer": 36, "../../object/is-value": 45, "../../object/valid-callable": 55, "../../object/valid-value": 56, "../../string/is-string": 60, "es6-symbol": 74 }], 26: [function (e, t, r) {
|
834
|
+
"use strict";
|
835
|
+
var n = Object.prototype.toString, i = n.call(function () { return arguments; }());
|
836
|
+
t.exports = function (e) { return n.call(e) === i; };
|
837
|
+
}, {}], 27: [function (e, t, r) {
|
838
|
+
"use strict";
|
839
|
+
var n = Object.prototype.toString, i = RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);
|
840
|
+
t.exports = function (e) { return "function" == typeof e && i(n.call(e)); };
|
841
|
+
}, {}], 28: [function (e, t, r) {
|
842
|
+
"use strict";
|
843
|
+
t.exports = function () { };
|
844
|
+
}, {}], 29: [function (e, t, r) {
|
845
|
+
"use strict";
|
846
|
+
t.exports = e("./is-implemented")() ? Math.sign : e("./shim");
|
847
|
+
}, { "./is-implemented": 30, "./shim": 31 }], 30: [function (e, t, r) {
|
848
|
+
"use strict";
|
849
|
+
t.exports = function () { var e = Math.sign; return "function" == typeof e && (1 === e(10) && -1 === e(-20)); };
|
850
|
+
}, {}], 31: [function (e, t, r) {
|
851
|
+
"use strict";
|
852
|
+
t.exports = function (e) { return e = Number(e), isNaN(e) || 0 === e ? e : e > 0 ? 1 : -1; };
|
853
|
+
}, {}], 32: [function (e, t, r) {
|
854
|
+
"use strict";
|
855
|
+
t.exports = e("./is-implemented")() ? Number.isNaN : e("./shim");
|
856
|
+
}, { "./is-implemented": 33, "./shim": 34 }], 33: [function (e, t, r) {
|
857
|
+
"use strict";
|
858
|
+
t.exports = function () { var e = Number.isNaN; return "function" == typeof e && (!e({}) && e(NaN) && !e(34)); };
|
859
|
+
}, {}], 34: [function (e, t, r) {
|
860
|
+
"use strict";
|
861
|
+
t.exports = function (e) { return e != e; };
|
862
|
+
}, {}], 35: [function (e, t, r) {
|
863
|
+
"use strict";
|
864
|
+
var n = e("../math/sign"), i = Math.abs, o = Math.floor;
|
865
|
+
t.exports = function (e) { return isNaN(e) ? 0 : 0 !== (e = Number(e)) && isFinite(e) ? n(e) * o(i(e)) : e; };
|
866
|
+
}, { "../math/sign": 29 }], 36: [function (e, t, r) {
|
867
|
+
"use strict";
|
868
|
+
var n = e("./to-integer"), i = Math.max;
|
869
|
+
t.exports = function (e) { return i(0, n(e)); };
|
870
|
+
}, { "./to-integer": 35 }], 37: [function (e, t, r) {
|
871
|
+
"use strict";
|
872
|
+
var n = e("./valid-callable"), i = e("./valid-value"), o = Function.prototype.bind, s = Function.prototype.call, a = Object.keys, u = Object.prototype.propertyIsEnumerable;
|
873
|
+
t.exports = function (e, t) { return function (r, c) { var l, f = arguments[2], p = arguments[3]; return r = Object(i(r)), n(c), l = a(r), p && l.sort("function" == typeof p ? o.call(p, r) : void 0), "function" != typeof e && (e = l[e]), s.call(e, l, function (e, n) { return u.call(r, e) ? s.call(c, f, r[e], e, r, n) : t; }); }; };
|
874
|
+
}, { "./valid-callable": 55, "./valid-value": 56 }], 38: [function (e, t, r) {
|
875
|
+
"use strict";
|
876
|
+
t.exports = e("./is-implemented")() ? Object.assign : e("./shim");
|
877
|
+
}, { "./is-implemented": 39, "./shim": 40 }], 39: [function (e, t, r) {
|
878
|
+
"use strict";
|
879
|
+
t.exports = function () { var e, t = Object.assign; return "function" == typeof t && (t(e = { foo: "raz" }, { bar: "dwa" }, { trzy: "trzy" }), e.foo + e.bar + e.trzy === "razdwatrzy"); };
|
880
|
+
}, {}], 40: [function (e, t, r) {
|
881
|
+
"use strict";
|
882
|
+
var n = e("../keys"), i = e("../valid-value"), o = Math.max;
|
883
|
+
t.exports = function (e, t) { var r, s, a, u = o(arguments.length, 2); for (e = Object(i(e)), a = function (n) { try {
|
884
|
+
e[n] = t[n];
|
885
|
+
}
|
886
|
+
catch (e) {
|
887
|
+
r || (r = e);
|
888
|
+
} }, s = 1; s < u; ++s)
|
889
|
+
t = arguments[s], n(t).forEach(a); if (void 0 !== r)
|
890
|
+
throw r; return e; };
|
891
|
+
}, { "../keys": 46, "../valid-value": 56 }], 41: [function (e, t, r) {
|
892
|
+
"use strict";
|
893
|
+
var n = e("../array/from"), i = e("./assign"), o = e("./valid-value");
|
894
|
+
t.exports = function (e) { var t = Object(o(e)), r = arguments[1], s = Object(arguments[2]); if (t !== e && !r)
|
895
|
+
return t; var a = {}; return r ? n(r, function (t) { (s.ensure || t in e) && (a[t] = e[t]); }) : i(a, e), a; };
|
896
|
+
}, { "../array/from": 23, "./assign": 38, "./valid-value": 56 }], 42: [function (e, t, r) {
|
897
|
+
"use strict";
|
898
|
+
var n, i, o, s, a = Object.create;
|
899
|
+
e("./set-prototype-of/is-implemented")() || (n = e("./set-prototype-of/shim")), t.exports = n ? 1 !== n.level ? a : (i = {}, o = {}, s = { configurable: !1, enumerable: !1, writable: !0, value: void 0 }, Object.getOwnPropertyNames(Object.prototype).forEach(function (e) { o[e] = "__proto__" !== e ? s : { configurable: !0, enumerable: !1, writable: !0, value: void 0 }; }), Object.defineProperties(i, o), Object.defineProperty(n, "nullPolyfill", { configurable: !1, enumerable: !1, writable: !1, value: i }), function (e, t) { return a(null === e ? i : e, t); }) : a;
|
900
|
+
}, { "./set-prototype-of/is-implemented": 53, "./set-prototype-of/shim": 54 }], 43: [function (e, t, r) {
|
901
|
+
"use strict";
|
902
|
+
t.exports = e("./_iterate")("forEach");
|
903
|
+
}, { "./_iterate": 37 }], 44: [function (e, t, r) {
|
904
|
+
"use strict";
|
905
|
+
var n = e("./is-value"), i = { function: !0, object: !0 };
|
906
|
+
t.exports = function (e) { return n(e) && i[typeof e] || !1; };
|
907
|
+
}, { "./is-value": 45 }], 45: [function (e, t, r) {
|
908
|
+
"use strict";
|
909
|
+
var n = e("../function/noop")();
|
910
|
+
t.exports = function (e) { return e !== n && null !== e; };
|
911
|
+
}, { "../function/noop": 28 }], 46: [function (e, t, r) {
|
912
|
+
"use strict";
|
913
|
+
t.exports = e("./is-implemented")() ? Object.keys : e("./shim");
|
914
|
+
}, { "./is-implemented": 47, "./shim": 48 }], 47: [function (e, t, r) {
|
915
|
+
"use strict";
|
916
|
+
t.exports = function () { try {
|
917
|
+
return Object.keys("primitive"), !0;
|
918
|
+
}
|
919
|
+
catch (e) {
|
920
|
+
return !1;
|
921
|
+
} };
|
922
|
+
}, {}], 48: [function (e, t, r) {
|
923
|
+
"use strict";
|
924
|
+
var n = e("../is-value"), i = Object.keys;
|
925
|
+
t.exports = function (e) { return i(n(e) ? Object(e) : e); };
|
926
|
+
}, { "../is-value": 45 }], 49: [function (e, t, r) {
|
927
|
+
"use strict";
|
928
|
+
var n = e("./valid-callable"), i = e("./for-each"), o = Function.prototype.call;
|
929
|
+
t.exports = function (e, t) { var r = {}, s = arguments[2]; return n(t), i(e, function (e, n, i, a) { r[n] = o.call(t, s, e, n, i, a); }), r; };
|
930
|
+
}, { "./for-each": 43, "./valid-callable": 55 }], 50: [function (e, t, r) {
|
931
|
+
"use strict";
|
932
|
+
var n = e("./is-value"), i = Array.prototype.forEach, o = Object.create;
|
933
|
+
t.exports = function (e) { var t = o(null); return i.call(arguments, function (e) { n(e) && function (e, t) { var r; for (r in e)
|
934
|
+
t[r] = e[r]; }(Object(e), t); }), t; };
|
935
|
+
}, { "./is-value": 45 }], 51: [function (e, t, r) {
|
936
|
+
"use strict";
|
937
|
+
var n = Array.prototype.forEach, i = Object.create;
|
938
|
+
t.exports = function (e) { var t = i(null); return n.call(arguments, function (e) { t[e] = !0; }), t; };
|
939
|
+
}, {}], 52: [function (e, t, r) {
|
940
|
+
"use strict";
|
941
|
+
t.exports = e("./is-implemented")() ? Object.setPrototypeOf : e("./shim");
|
942
|
+
}, { "./is-implemented": 53, "./shim": 54 }], 53: [function (e, t, r) {
|
943
|
+
"use strict";
|
944
|
+
var n = Object.create, i = Object.getPrototypeOf, o = {};
|
945
|
+
t.exports = function () { var e = Object.setPrototypeOf, t = arguments[0] || n; return "function" == typeof e && i(e(t(null), o)) === o; };
|
946
|
+
}, {}], 54: [function (e, t, r) {
|
947
|
+
"use strict";
|
948
|
+
var n, i, o, s, a = e("../is-object"), u = e("../valid-value"), c = Object.prototype.isPrototypeOf, l = Object.defineProperty, f = { configurable: !0, enumerable: !1, writable: !0, value: void 0 };
|
949
|
+
n = function (e, t) { if (u(e), null === t || a(t))
|
950
|
+
return e; throw new TypeError("Prototype must be null or an object"); }, t.exports = (i = function () { var e, t = Object.create(null), r = {}, n = Object.getOwnPropertyDescriptor(Object.prototype, "__proto__"); if (n) {
|
951
|
+
try {
|
952
|
+
(e = n.set).call(t, r);
|
953
|
+
}
|
954
|
+
catch (e) { }
|
955
|
+
if (Object.getPrototypeOf(t) === r)
|
956
|
+
return { set: e, level: 2 };
|
957
|
+
} return t.__proto__ = r, Object.getPrototypeOf(t) === r ? { level: 2 } : ((t = {}).__proto__ = r, Object.getPrototypeOf(t) === r && { level: 1 }); }()) ? (2 === i.level ? i.set ? (s = i.set, o = function (e, t) { return s.call(n(e, t), t), e; }) : o = function (e, t) { return n(e, t).__proto__ = t, e; } : o = function e(t, r) { var i; return n(t, r), (i = c.call(e.nullPolyfill, t)) && delete e.nullPolyfill.__proto__, null === r && (r = e.nullPolyfill), t.__proto__ = r, i && l(e.nullPolyfill, "__proto__", f), t; }, Object.defineProperty(o, "level", { configurable: !1, enumerable: !1, writable: !1, value: i.level })) : null, e("../create");
|
958
|
+
}, { "../create": 42, "../is-object": 44, "../valid-value": 56 }], 55: [function (e, t, r) {
|
959
|
+
"use strict";
|
960
|
+
t.exports = function (e) { if ("function" != typeof e)
|
961
|
+
throw new TypeError(e + " is not a function"); return e; };
|
962
|
+
}, {}], 56: [function (e, t, r) {
|
963
|
+
"use strict";
|
964
|
+
var n = e("./is-value");
|
965
|
+
t.exports = function (e) { if (!n(e))
|
966
|
+
throw new TypeError("Cannot use null or undefined"); return e; };
|
967
|
+
}, { "./is-value": 45 }], 57: [function (e, t, r) {
|
968
|
+
"use strict";
|
969
|
+
t.exports = e("./is-implemented")() ? String.prototype.contains : e("./shim");
|
970
|
+
}, { "./is-implemented": 58, "./shim": 59 }], 58: [function (e, t, r) {
|
971
|
+
"use strict";
|
972
|
+
var n = "razdwatrzy";
|
973
|
+
t.exports = function () { return "function" == typeof n.contains && (!0 === n.contains("dwa") && !1 === n.contains("foo")); };
|
974
|
+
}, {}], 59: [function (e, t, r) {
|
975
|
+
"use strict";
|
976
|
+
var n = String.prototype.indexOf;
|
977
|
+
t.exports = function (e) { return n.call(this, e, arguments[1]) > -1; };
|
978
|
+
}, {}], 60: [function (e, t, r) {
|
979
|
+
"use strict";
|
980
|
+
var n = Object.prototype.toString, i = n.call("");
|
981
|
+
t.exports = function (e) { return "string" == typeof e || e && "object" == typeof e && (e instanceof String || n.call(e) === i) || !1; };
|
982
|
+
}, {}], 61: [function (e, t, r) {
|
983
|
+
"use strict";
|
984
|
+
var n, i = e("es5-ext/object/set-prototype-of"), o = e("es5-ext/string/#/contains"), s = e("d"), a = e("es6-symbol"), u = e("./"), c = Object.defineProperty;
|
985
|
+
n = t.exports = function (e, t) { if (!(this instanceof n))
|
986
|
+
throw new TypeError("Constructor requires 'new'"); u.call(this, e), t = t ? o.call(t, "key+value") ? "key+value" : o.call(t, "key") ? "key" : "value" : "value", c(this, "__kind__", s("", t)); }, i && i(n, u), delete n.prototype.constructor, n.prototype = Object.create(u.prototype, { _resolve: s(function (e) { return "value" === this.__kind__ ? this.__list__[e] : "key+value" === this.__kind__ ? [e, this.__list__[e]] : e; }) }), c(n.prototype, a.toStringTag, s("c", "Array Iterator"));
|
987
|
+
}, { "./": 64, d: 15, "es5-ext/object/set-prototype-of": 52, "es5-ext/string/#/contains": 57, "es6-symbol": 74 }], 62: [function (e, t, r) {
|
988
|
+
"use strict";
|
989
|
+
var n = e("es5-ext/function/is-arguments"), i = e("es5-ext/object/valid-callable"), o = e("es5-ext/string/is-string"), s = e("./get"), a = Array.isArray, u = Function.prototype.call, c = Array.prototype.some;
|
990
|
+
t.exports = function (e, t) { var r, l, f, p, h, d, g, b, y = arguments[2]; if (a(e) || n(e) ? r = "array" : o(e) ? r = "string" : e = s(e), i(t), f = function () { p = !0; }, "array" !== r)
|
991
|
+
if ("string" !== r)
|
992
|
+
for (l = e.next(); !l.done;) {
|
993
|
+
if (u.call(t, y, l.value, f), p)
|
994
|
+
return;
|
995
|
+
l = e.next();
|
996
|
+
}
|
997
|
+
else
|
998
|
+
for (d = e.length, h = 0; h < d && (g = e[h], h + 1 < d && (b = g.charCodeAt(0)) >= 55296 && b <= 56319 && (g += e[++h]), u.call(t, y, g, f), !p); ++h)
|
999
|
+
;
|
1000
|
+
else
|
1001
|
+
c.call(e, function (e) { return u.call(t, y, e, f), p; }); };
|
1002
|
+
}, { "./get": 63, "es5-ext/function/is-arguments": 26, "es5-ext/object/valid-callable": 55, "es5-ext/string/is-string": 60 }], 63: [function (e, t, r) {
|
1003
|
+
"use strict";
|
1004
|
+
var n = e("es5-ext/function/is-arguments"), i = e("es5-ext/string/is-string"), o = e("./array"), s = e("./string"), a = e("./valid-iterable"), u = e("es6-symbol").iterator;
|
1005
|
+
t.exports = function (e) { return "function" == typeof a(e)[u] ? e[u]() : n(e) ? new o(e) : i(e) ? new s(e) : new o(e); };
|
1006
|
+
}, { "./array": 61, "./string": 66, "./valid-iterable": 67, "es5-ext/function/is-arguments": 26, "es5-ext/string/is-string": 60, "es6-symbol": 74 }], 64: [function (e, t, r) {
|
1007
|
+
"use strict";
|
1008
|
+
var n, i = e("es5-ext/array/#/clear"), o = e("es5-ext/object/assign"), s = e("es5-ext/object/valid-callable"), a = e("es5-ext/object/valid-value"), u = e("d"), c = e("d/auto-bind"), l = e("es6-symbol"), f = Object.defineProperty, p = Object.defineProperties;
|
1009
|
+
t.exports = n = function (e, t) { if (!(this instanceof n))
|
1010
|
+
throw new TypeError("Constructor requires 'new'"); p(this, { __list__: u("w", a(e)), __context__: u("w", t), __nextIndex__: u("w", 0) }), t && (s(t.on), t.on("_add", this._onAdd), t.on("_delete", this._onDelete), t.on("_clear", this._onClear)); }, delete n.prototype.constructor, p(n.prototype, o({ _next: u(function () { var e; if (this.__list__)
|
1011
|
+
return this.__redo__ && void 0 !== (e = this.__redo__.shift()) ? e : this.__nextIndex__ < this.__list__.length ? this.__nextIndex__++ : void this._unBind(); }), next: u(function () { return this._createResult(this._next()); }), _createResult: u(function (e) { return void 0 === e ? { done: !0, value: void 0 } : { done: !1, value: this._resolve(e) }; }), _resolve: u(function (e) { return this.__list__[e]; }), _unBind: u(function () { this.__list__ = null, delete this.__redo__, this.__context__ && (this.__context__.off("_add", this._onAdd), this.__context__.off("_delete", this._onDelete), this.__context__.off("_clear", this._onClear), this.__context__ = null); }), toString: u(function () { return "[object " + (this[l.toStringTag] || "Object") + "]"; }) }, c({ _onAdd: u(function (e) { e >= this.__nextIndex__ || (++this.__nextIndex__, this.__redo__ ? (this.__redo__.forEach(function (t, r) { t >= e && (this.__redo__[r] = ++t); }, this), this.__redo__.push(e)) : f(this, "__redo__", u("c", [e]))); }), _onDelete: u(function (e) { var t; e >= this.__nextIndex__ || (--this.__nextIndex__, this.__redo__ && (-1 !== (t = this.__redo__.indexOf(e)) && this.__redo__.splice(t, 1), this.__redo__.forEach(function (t, r) { t > e && (this.__redo__[r] = --t); }, this))); }), _onClear: u(function () { this.__redo__ && i.call(this.__redo__), this.__nextIndex__ = 0; }) }))), f(n.prototype, l.iterator, u(function () { return this; }));
|
1012
|
+
}, { d: 15, "d/auto-bind": 14, "es5-ext/array/#/clear": 21, "es5-ext/object/assign": 38, "es5-ext/object/valid-callable": 55, "es5-ext/object/valid-value": 56, "es6-symbol": 74 }], 65: [function (e, t, r) {
|
1013
|
+
"use strict";
|
1014
|
+
var n = e("es5-ext/function/is-arguments"), i = e("es5-ext/object/is-value"), o = e("es5-ext/string/is-string"), s = e("es6-symbol").iterator, a = Array.isArray;
|
1015
|
+
t.exports = function (e) { return !!i(e) && (!!a(e) || (!!o(e) || (!!n(e) || "function" == typeof e[s]))); };
|
1016
|
+
}, { "es5-ext/function/is-arguments": 26, "es5-ext/object/is-value": 45, "es5-ext/string/is-string": 60, "es6-symbol": 74 }], 66: [function (e, t, r) {
|
1017
|
+
"use strict";
|
1018
|
+
var n, i = e("es5-ext/object/set-prototype-of"), o = e("d"), s = e("es6-symbol"), a = e("./"), u = Object.defineProperty;
|
1019
|
+
n = t.exports = function (e) { if (!(this instanceof n))
|
1020
|
+
throw new TypeError("Constructor requires 'new'"); e = String(e), a.call(this, e), u(this, "__length__", o("", e.length)); }, i && i(n, a), delete n.prototype.constructor, n.prototype = Object.create(a.prototype, { _next: o(function () { if (this.__list__)
|
1021
|
+
return this.__nextIndex__ < this.__length__ ? this.__nextIndex__++ : void this._unBind(); }), _resolve: o(function (e) { var t, r = this.__list__[e]; return this.__nextIndex__ === this.__length__ ? r : (t = r.charCodeAt(0)) >= 55296 && t <= 56319 ? r + this.__list__[this.__nextIndex__++] : r; }) }), u(n.prototype, s.toStringTag, o("c", "String Iterator"));
|
1022
|
+
}, { "./": 64, d: 15, "es5-ext/object/set-prototype-of": 52, "es6-symbol": 74 }], 67: [function (e, t, r) {
|
1023
|
+
"use strict";
|
1024
|
+
var n = e("./is-iterable");
|
1025
|
+
t.exports = function (e) { if (!n(e))
|
1026
|
+
throw new TypeError(e + " is not iterable"); return e; };
|
1027
|
+
}, { "./is-iterable": 65 }], 68: [function (e, t, r) {
|
1028
|
+
"use strict";
|
1029
|
+
t.exports = e("./is-implemented")() ? Map : e("./polyfill");
|
1030
|
+
}, { "./is-implemented": 69, "./polyfill": 73 }], 69: [function (e, t, r) {
|
1031
|
+
"use strict";
|
1032
|
+
t.exports = function () { var e, t; if ("function" != typeof Map)
|
1033
|
+
return !1; try {
|
1034
|
+
e = new Map([["raz", "one"], ["dwa", "two"], ["trzy", "three"]]);
|
1035
|
+
}
|
1036
|
+
catch (e) {
|
1037
|
+
return !1;
|
1038
|
+
} return "[object Map]" === String(e) && (3 === e.size && ("function" == typeof e.clear && ("function" == typeof e.delete && ("function" == typeof e.entries && ("function" == typeof e.forEach && ("function" == typeof e.get && ("function" == typeof e.has && ("function" == typeof e.keys && ("function" == typeof e.set && ("function" == typeof e.values && (!1 === (t = e.entries().next()).done && (!!t.value && ("raz" === t.value[0] && "one" === t.value[1]))))))))))))); };
|
1039
|
+
}, {}], 70: [function (e, t, r) {
|
1040
|
+
"use strict";
|
1041
|
+
t.exports = "undefined" != typeof Map && "[object Map]" === Object.prototype.toString.call(new Map);
|
1042
|
+
}, {}], 71: [function (e, t, r) {
|
1043
|
+
"use strict";
|
1044
|
+
t.exports = e("es5-ext/object/primitive-set")("key", "value", "key+value");
|
1045
|
+
}, { "es5-ext/object/primitive-set": 51 }], 72: [function (e, t, r) {
|
1046
|
+
"use strict";
|
1047
|
+
var n, i = e("es5-ext/object/set-prototype-of"), o = e("d"), s = e("es6-iterator"), a = e("es6-symbol").toStringTag, u = e("./iterator-kinds"), c = Object.defineProperties, l = s.prototype._unBind;
|
1048
|
+
n = t.exports = function (e, t) { if (!(this instanceof n))
|
1049
|
+
return new n(e, t); s.call(this, e.__mapKeysData__, e), t && u[t] || (t = "key+value"), c(this, { __kind__: o("", t), __values__: o("w", e.__mapValuesData__) }); }, i && i(n, s), n.prototype = Object.create(s.prototype, { constructor: o(n), _resolve: o(function (e) { return "value" === this.__kind__ ? this.__values__[e] : "key" === this.__kind__ ? this.__list__[e] : [this.__list__[e], this.__values__[e]]; }), _unBind: o(function () { this.__values__ = null, l.call(this); }), toString: o(function () { return "[object Map Iterator]"; }) }), Object.defineProperty(n.prototype, a, o("c", "Map Iterator"));
|
1050
|
+
}, { "./iterator-kinds": 71, d: 15, "es5-ext/object/set-prototype-of": 52, "es6-iterator": 64, "es6-symbol": 74 }], 73: [function (e, t, r) {
|
1051
|
+
"use strict";
|
1052
|
+
var n, i = e("es5-ext/array/#/clear"), o = e("es5-ext/array/#/e-index-of"), s = e("es5-ext/object/set-prototype-of"), a = e("es5-ext/object/valid-callable"), u = e("es5-ext/object/valid-value"), c = e("d"), l = e("event-emitter"), f = e("es6-symbol"), p = e("es6-iterator/valid-iterable"), h = e("es6-iterator/for-of"), d = e("./lib/iterator"), g = e("./is-native-implemented"), b = Function.prototype.call, y = Object.defineProperties, m = Object.getPrototypeOf;
|
1053
|
+
t.exports = n = function () { var e, t, r, i = arguments[0]; if (!(this instanceof n))
|
1054
|
+
throw new TypeError("Constructor requires 'new'"); return r = g && s && Map !== n ? s(new Map, m(this)) : this, null != i && p(i), y(r, { __mapKeysData__: c("c", e = []), __mapValuesData__: c("c", t = []) }), i ? (h(i, function (r) { var n = u(r)[0]; r = r[1], -1 === o.call(e, n) && (e.push(n), t.push(r)); }, r), r) : r; }, g && (s && s(n, Map), n.prototype = Object.create(Map.prototype, { constructor: c(n) })), l(y(n.prototype, { clear: c(function () { this.__mapKeysData__.length && (i.call(this.__mapKeysData__), i.call(this.__mapValuesData__), this.emit("_clear")); }), delete: c(function (e) { var t = o.call(this.__mapKeysData__, e); return -1 !== t && (this.__mapKeysData__.splice(t, 1), this.__mapValuesData__.splice(t, 1), this.emit("_delete", t, e), !0); }), entries: c(function () { return new d(this, "key+value"); }), forEach: c(function (e) { var t, r, n = arguments[1]; for (a(e), r = (t = this.entries())._next(); void 0 !== r;)
|
1055
|
+
b.call(e, n, this.__mapValuesData__[r], this.__mapKeysData__[r], this), r = t._next(); }), get: c(function (e) { var t = o.call(this.__mapKeysData__, e); if (-1 !== t)
|
1056
|
+
return this.__mapValuesData__[t]; }), has: c(function (e) { return -1 !== o.call(this.__mapKeysData__, e); }), keys: c(function () { return new d(this, "key"); }), set: c(function (e, t) { var r, n = o.call(this.__mapKeysData__, e); return -1 === n && (n = this.__mapKeysData__.push(e) - 1, r = !0), this.__mapValuesData__[n] = t, r && this.emit("_add", n, e), this; }), size: c.gs(function () { return this.__mapKeysData__.length; }), values: c(function () { return new d(this, "value"); }), toString: c(function () { return "[object Map]"; }) })), Object.defineProperty(n.prototype, f.iterator, c(function () { return this.entries(); })), Object.defineProperty(n.prototype, f.toStringTag, c("c", "Map"));
|
1057
|
+
}, { "./is-native-implemented": 70, "./lib/iterator": 72, d: 15, "es5-ext/array/#/clear": 21, "es5-ext/array/#/e-index-of": 22, "es5-ext/object/set-prototype-of": 52, "es5-ext/object/valid-callable": 55, "es5-ext/object/valid-value": 56, "es6-iterator/for-of": 62, "es6-iterator/valid-iterable": 67, "es6-symbol": 74, "event-emitter": 82 }], 74: [function (e, t, r) {
|
1058
|
+
"use strict";
|
1059
|
+
t.exports = e("./is-implemented")() ? e("ext/global-this").Symbol : e("./polyfill");
|
1060
|
+
}, { "./is-implemented": 75, "./polyfill": 80, "ext/global-this": 85 }], 75: [function (e, t, r) {
|
1061
|
+
"use strict";
|
1062
|
+
var n = e("ext/global-this"), i = { object: !0, symbol: !0 };
|
1063
|
+
t.exports = function () { var e, t = n.Symbol; if ("function" != typeof t)
|
1064
|
+
return !1; e = t("test symbol"); try {
|
1065
|
+
String(e);
|
1066
|
+
}
|
1067
|
+
catch (e) {
|
1068
|
+
return !1;
|
1069
|
+
} return !!i[typeof t.iterator] && (!!i[typeof t.toPrimitive] && !!i[typeof t.toStringTag]); };
|
1070
|
+
}, { "ext/global-this": 85 }], 76: [function (e, t, r) {
|
1071
|
+
"use strict";
|
1072
|
+
t.exports = function (e) { return !!e && ("symbol" == typeof e || !!e.constructor && ("Symbol" === e.constructor.name && "Symbol" === e[e.constructor.toStringTag])); };
|
1073
|
+
}, {}], 77: [function (e, t, r) {
|
1074
|
+
"use strict";
|
1075
|
+
var n = e("d"), i = Object.create, o = Object.defineProperty, s = Object.prototype, a = i(null);
|
1076
|
+
t.exports = function (e) { for (var t, r, i = 0; a[e + (i || "")];)
|
1077
|
+
++i; return a[e += i || ""] = !0, o(s, t = "@@" + e, n.gs(null, function (e) { r || (r = !0, o(this, t, n(e)), r = !1); })), t; };
|
1078
|
+
}, { d: 15 }], 78: [function (e, t, r) {
|
1079
|
+
"use strict";
|
1080
|
+
var n = e("d"), i = e("ext/global-this").Symbol;
|
1081
|
+
t.exports = function (e) { return Object.defineProperties(e, { hasInstance: n("", i && i.hasInstance || e("hasInstance")), isConcatSpreadable: n("", i && i.isConcatSpreadable || e("isConcatSpreadable")), iterator: n("", i && i.iterator || e("iterator")), match: n("", i && i.match || e("match")), replace: n("", i && i.replace || e("replace")), search: n("", i && i.search || e("search")), species: n("", i && i.species || e("species")), split: n("", i && i.split || e("split")), toPrimitive: n("", i && i.toPrimitive || e("toPrimitive")), toStringTag: n("", i && i.toStringTag || e("toStringTag")), unscopables: n("", i && i.unscopables || e("unscopables")) }); };
|
1082
|
+
}, { d: 15, "ext/global-this": 85 }], 79: [function (e, t, r) {
|
1083
|
+
"use strict";
|
1084
|
+
var n = e("d"), i = e("../../../validate-symbol"), o = Object.create(null);
|
1085
|
+
t.exports = function (e) { return Object.defineProperties(e, { for: n(function (t) { return o[t] ? o[t] : o[t] = e(String(t)); }), keyFor: n(function (e) { var t; for (t in i(e), o)
|
1086
|
+
if (o[t] === e)
|
1087
|
+
return t; }) }); };
|
1088
|
+
}, { "../../../validate-symbol": 81, d: 15 }], 80: [function (e, t, r) {
|
1089
|
+
"use strict";
|
1090
|
+
var n, i, o, s = e("d"), a = e("./validate-symbol"), u = e("ext/global-this").Symbol, c = e("./lib/private/generate-name"), l = e("./lib/private/setup/standard-symbols"), f = e("./lib/private/setup/symbol-registry"), p = Object.create, h = Object.defineProperties, d = Object.defineProperty;
|
1091
|
+
if ("function" == typeof u)
|
1092
|
+
try {
|
1093
|
+
String(u()), o = !0;
|
1094
|
+
}
|
1095
|
+
catch (e) { }
|
1096
|
+
else
|
1097
|
+
u = null;
|
1098
|
+
i = function (e) { if (this instanceof i)
|
1099
|
+
throw new TypeError("Symbol is not a constructor"); return n(e); }, t.exports = n = function e(t) { var r; if (this instanceof e)
|
1100
|
+
throw new TypeError("Symbol is not a constructor"); return o ? u(t) : (r = p(i.prototype), t = void 0 === t ? "" : String(t), h(r, { __description__: s("", t), __name__: s("", c(t)) })); }, l(n), f(n), h(i.prototype, { constructor: s(n), toString: s("", function () { return this.__name__; }) }), h(n.prototype, { toString: s(function () { return "Symbol (" + a(this).__description__ + ")"; }), valueOf: s(function () { return a(this); }) }), d(n.prototype, n.toPrimitive, s("", function () { var e = a(this); return "symbol" == typeof e ? e : e.toString(); })), d(n.prototype, n.toStringTag, s("c", "Symbol")), d(i.prototype, n.toStringTag, s("c", n.prototype[n.toStringTag])), d(i.prototype, n.toPrimitive, s("c", n.prototype[n.toPrimitive]));
|
1101
|
+
}, { "./lib/private/generate-name": 77, "./lib/private/setup/standard-symbols": 78, "./lib/private/setup/symbol-registry": 79, "./validate-symbol": 81, d: 15, "ext/global-this": 85 }], 81: [function (e, t, r) {
|
1102
|
+
"use strict";
|
1103
|
+
var n = e("./is-symbol");
|
1104
|
+
t.exports = function (e) { if (!n(e))
|
1105
|
+
throw new TypeError(e + " is not a symbol"); return e; };
|
1106
|
+
}, { "./is-symbol": 76 }], 82: [function (e, t, r) {
|
1107
|
+
"use strict";
|
1108
|
+
var n, i, o, s, a, u, c, l = e("d"), f = e("es5-ext/object/valid-callable"), p = Function.prototype.apply, h = Function.prototype.call, d = Object.create, g = Object.defineProperty, b = Object.defineProperties, y = Object.prototype.hasOwnProperty, m = { configurable: !0, enumerable: !1, writable: !0 };
|
1109
|
+
a = { on: n = function (e, t) { var r; return f(t), y.call(this, "__ee__") ? r = this.__ee__ : (r = m.value = d(null), g(this, "__ee__", m), m.value = null), r[e] ? "object" == typeof r[e] ? r[e].push(t) : r[e] = [r[e], t] : r[e] = t, this; }, once: i = function (e, t) { var r, i; return f(t), i = this, n.call(this, e, r = function () { o.call(i, e, r), p.call(t, this, arguments); }), r.__eeOnceListener__ = t, this; }, off: o = function (e, t) { var r, n, i, o; if (f(t), !y.call(this, "__ee__"))
|
1110
|
+
return this; if (!(r = this.__ee__)[e])
|
1111
|
+
return this; if ("object" == typeof (n = r[e]))
|
1112
|
+
for (o = 0; i = n[o]; ++o)
|
1113
|
+
i !== t && i.__eeOnceListener__ !== t || (2 === n.length ? r[e] = n[o ? 0 : 1] : n.splice(o, 1));
|
1114
|
+
else
|
1115
|
+
n !== t && n.__eeOnceListener__ !== t || delete r[e]; return this; }, emit: s = function (e) { var t, r, n, i, o; if (y.call(this, "__ee__") && (i = this.__ee__[e]))
|
1116
|
+
if ("object" == typeof i) {
|
1117
|
+
for (r = arguments.length, o = new Array(r - 1), t = 1; t < r; ++t)
|
1118
|
+
o[t - 1] = arguments[t];
|
1119
|
+
for (i = i.slice(), t = 0; n = i[t]; ++t)
|
1120
|
+
p.call(n, this, o);
|
1121
|
+
}
|
1122
|
+
else
|
1123
|
+
switch (arguments.length) {
|
1124
|
+
case 1:
|
1125
|
+
h.call(i, this);
|
1126
|
+
break;
|
1127
|
+
case 2:
|
1128
|
+
h.call(i, this, arguments[1]);
|
1129
|
+
break;
|
1130
|
+
case 3:
|
1131
|
+
h.call(i, this, arguments[1], arguments[2]);
|
1132
|
+
break;
|
1133
|
+
default:
|
1134
|
+
for (r = arguments.length, o = new Array(r - 1), t = 1; t < r; ++t)
|
1135
|
+
o[t - 1] = arguments[t];
|
1136
|
+
p.call(i, this, o);
|
1137
|
+
} } }, u = { on: l(n), once: l(i), off: l(o), emit: l(s) }, c = b({}, u), t.exports = r = function (e) { return null == e ? d(c) : b(Object(e), u); }, r.methods = a;
|
1138
|
+
}, { d: 15, "es5-ext/object/valid-callable": 55 }], 83: [function (e, t, r) { var n = Object.create || function (e) { var t = function () { }; return t.prototype = e, new t; }, i = Object.keys || function (e) { var t = []; for (var r in e)
|
1139
|
+
Object.prototype.hasOwnProperty.call(e, r) && t.push(r); return r; }, o = Function.prototype.bind || function (e) { var t = this; return function () { return t.apply(e, arguments); }; }; function s() { this._events && Object.prototype.hasOwnProperty.call(this, "_events") || (this._events = n(null), this._eventsCount = 0), this._maxListeners = this._maxListeners || void 0; } t.exports = s, s.EventEmitter = s, s.prototype._events = void 0, s.prototype._maxListeners = void 0; var a, u = 10; try {
|
1140
|
+
var c = {};
|
1141
|
+
Object.defineProperty && Object.defineProperty(c, "x", { value: 0 }), a = 0 === c.x;
|
1142
|
+
}
|
1143
|
+
catch (e) {
|
1144
|
+
a = !1;
|
1145
|
+
} function l(e) { return void 0 === e._maxListeners ? s.defaultMaxListeners : e._maxListeners; } function f(e, t, r, i) { var o, s, a; if ("function" != typeof r)
|
1146
|
+
throw new TypeError('"listener" argument must be a function'); if ((s = e._events) ? (s.newListener && (e.emit("newListener", t, r.listener ? r.listener : r), s = e._events), a = s[t]) : (s = e._events = n(null), e._eventsCount = 0), a) {
|
1147
|
+
if ("function" == typeof a ? a = s[t] = i ? [r, a] : [a, r] : i ? a.unshift(r) : a.push(r), !a.warned && (o = l(e)) && o > 0 && a.length > o) {
|
1148
|
+
a.warned = !0;
|
1149
|
+
var u = new Error("Possible EventEmitter memory leak detected. " + a.length + ' "' + String(t) + '" listeners added. Use emitter.setMaxListeners() to increase limit.');
|
1150
|
+
u.name = "MaxListenersExceededWarning", u.emitter = e, u.type = t, u.count = a.length, "object" == typeof console && console.warn && console.warn("%s: %s", u.name, u.message);
|
1151
|
+
}
|
1152
|
+
}
|
1153
|
+
else
|
1154
|
+
a = s[t] = r, ++e._eventsCount; return e; } function p() { if (!this.fired)
|
1155
|
+
switch ((this.target.removeListener(this.type, this.wrapFn), this.fired = !0, arguments.length)) {
|
1156
|
+
case 0: return this.listener.call(this.target);
|
1157
|
+
case 1: return this.listener.call(this.target, arguments[0]);
|
1158
|
+
case 2: return this.listener.call(this.target, arguments[0], arguments[1]);
|
1159
|
+
case 3: return this.listener.call(this.target, arguments[0], arguments[1], arguments[2]);
|
1160
|
+
default:
|
1161
|
+
for (var e = new Array(arguments.length), t = 0; t < e.length; ++t)
|
1162
|
+
e[t] = arguments[t];
|
1163
|
+
this.listener.apply(this.target, e);
|
1164
|
+
} } function h(e, t, r) { var n = { fired: !1, wrapFn: void 0, target: e, type: t, listener: r }, i = o.call(p, n); return i.listener = r, n.wrapFn = i, i; } function d(e, t, r) { var n = e._events; if (!n)
|
1165
|
+
return []; var i = n[t]; return i ? "function" == typeof i ? r ? [i.listener || i] : [i] : r ? function (e) { for (var t = new Array(e.length), r = 0; r < t.length; ++r)
|
1166
|
+
t[r] = e[r].listener || e[r]; return t; }(i) : b(i, i.length) : []; } function g(e) { var t = this._events; if (t) {
|
1167
|
+
var r = t[e];
|
1168
|
+
if ("function" == typeof r)
|
1169
|
+
return 1;
|
1170
|
+
if (r)
|
1171
|
+
return r.length;
|
1172
|
+
} return 0; } function b(e, t) { for (var r = new Array(t), n = 0; n < t; ++n)
|
1173
|
+
r[n] = e[n]; return r; } a ? Object.defineProperty(s, "defaultMaxListeners", { enumerable: !0, get: function () { return u; }, set: function (e) { if ("number" != typeof e || e < 0 || e != e)
|
1174
|
+
throw new TypeError('"defaultMaxListeners" must be a positive number'); u = e; } }) : s.defaultMaxListeners = u, s.prototype.setMaxListeners = function (e) { if ("number" != typeof e || e < 0 || isNaN(e))
|
1175
|
+
throw new TypeError('"n" argument must be a positive number'); return this._maxListeners = e, this; }, s.prototype.getMaxListeners = function () { return l(this); }, s.prototype.emit = function (e) { var t, r, n, i, o, s, a = "error" === e; if (s = this._events)
|
1176
|
+
a = a && null == s.error;
|
1177
|
+
else if (!a)
|
1178
|
+
return !1; if (a) {
|
1179
|
+
if (arguments.length > 1 && (t = arguments[1]), t instanceof Error)
|
1180
|
+
throw t;
|
1181
|
+
var u = new Error('Unhandled "error" event. (' + t + ")");
|
1182
|
+
throw u.context = t, u;
|
1183
|
+
} if (!(r = s[e]))
|
1184
|
+
return !1; var c = "function" == typeof r; switch (n = arguments.length) {
|
1185
|
+
case 1:
|
1186
|
+
!function (e, t, r) { if (t)
|
1187
|
+
e.call(r);
|
1188
|
+
else
|
1189
|
+
for (var n = e.length, i = b(e, n), o = 0; o < n; ++o)
|
1190
|
+
i[o].call(r); }(r, c, this);
|
1191
|
+
break;
|
1192
|
+
case 2:
|
1193
|
+
!function (e, t, r, n) { if (t)
|
1194
|
+
e.call(r, n);
|
1195
|
+
else
|
1196
|
+
for (var i = e.length, o = b(e, i), s = 0; s < i; ++s)
|
1197
|
+
o[s].call(r, n); }(r, c, this, arguments[1]);
|
1198
|
+
break;
|
1199
|
+
case 3:
|
1200
|
+
!function (e, t, r, n, i) { if (t)
|
1201
|
+
e.call(r, n, i);
|
1202
|
+
else
|
1203
|
+
for (var o = e.length, s = b(e, o), a = 0; a < o; ++a)
|
1204
|
+
s[a].call(r, n, i); }(r, c, this, arguments[1], arguments[2]);
|
1205
|
+
break;
|
1206
|
+
case 4:
|
1207
|
+
!function (e, t, r, n, i, o) { if (t)
|
1208
|
+
e.call(r, n, i, o);
|
1209
|
+
else
|
1210
|
+
for (var s = e.length, a = b(e, s), u = 0; u < s; ++u)
|
1211
|
+
a[u].call(r, n, i, o); }(r, c, this, arguments[1], arguments[2], arguments[3]);
|
1212
|
+
break;
|
1213
|
+
default:
|
1214
|
+
for (i = new Array(n - 1), o = 1; o < n; o++)
|
1215
|
+
i[o - 1] = arguments[o];
|
1216
|
+
!function (e, t, r, n) { if (t)
|
1217
|
+
e.apply(r, n);
|
1218
|
+
else
|
1219
|
+
for (var i = e.length, o = b(e, i), s = 0; s < i; ++s)
|
1220
|
+
o[s].apply(r, n); }(r, c, this, i);
|
1221
|
+
} return !0; }, s.prototype.addListener = function (e, t) { return f(this, e, t, !1); }, s.prototype.on = s.prototype.addListener, s.prototype.prependListener = function (e, t) { return f(this, e, t, !0); }, s.prototype.once = function (e, t) { if ("function" != typeof t)
|
1222
|
+
throw new TypeError('"listener" argument must be a function'); return this.on(e, h(this, e, t)), this; }, s.prototype.prependOnceListener = function (e, t) { if ("function" != typeof t)
|
1223
|
+
throw new TypeError('"listener" argument must be a function'); return this.prependListener(e, h(this, e, t)), this; }, s.prototype.removeListener = function (e, t) { var r, i, o, s, a; if ("function" != typeof t)
|
1224
|
+
throw new TypeError('"listener" argument must be a function'); if (!(i = this._events))
|
1225
|
+
return this; if (!(r = i[e]))
|
1226
|
+
return this; if (r === t || r.listener === t)
|
1227
|
+
0 == --this._eventsCount ? this._events = n(null) : (delete i[e], i.removeListener && this.emit("removeListener", e, r.listener || t));
|
1228
|
+
else if ("function" != typeof r) {
|
1229
|
+
for (o = -1, s = r.length - 1; s >= 0; s--)
|
1230
|
+
if (r[s] === t || r[s].listener === t) {
|
1231
|
+
a = r[s].listener, o = s;
|
1232
|
+
break;
|
1233
|
+
}
|
1234
|
+
if (o < 0)
|
1235
|
+
return this;
|
1236
|
+
0 === o ? r.shift() : function (e, t) { for (var r = t, n = r + 1, i = e.length; n < i; r += 1, n += 1)
|
1237
|
+
e[r] = e[n]; e.pop(); }(r, o), 1 === r.length && (i[e] = r[0]), i.removeListener && this.emit("removeListener", e, a || t);
|
1238
|
+
} return this; }, s.prototype.removeAllListeners = function (e) { var t, r, o; if (!(r = this._events))
|
1239
|
+
return this; if (!r.removeListener)
|
1240
|
+
return 0 === arguments.length ? (this._events = n(null), this._eventsCount = 0) : r[e] && (0 == --this._eventsCount ? this._events = n(null) : delete r[e]), this; if (0 === arguments.length) {
|
1241
|
+
var s, a = i(r);
|
1242
|
+
for (o = 0; o < a.length; ++o)
|
1243
|
+
"removeListener" !== (s = a[o]) && this.removeAllListeners(s);
|
1244
|
+
return this.removeAllListeners("removeListener"), this._events = n(null), this._eventsCount = 0, this;
|
1245
|
+
} if ("function" == typeof (t = r[e]))
|
1246
|
+
this.removeListener(e, t);
|
1247
|
+
else if (t)
|
1248
|
+
for (o = t.length - 1; o >= 0; o--)
|
1249
|
+
this.removeListener(e, t[o]); return this; }, s.prototype.listeners = function (e) { return d(this, e, !0); }, s.prototype.rawListeners = function (e) { return d(this, e, !1); }, s.listenerCount = function (e, t) { return "function" == typeof e.listenerCount ? e.listenerCount(t) : g.call(e, t); }, s.prototype.listenerCount = g, s.prototype.eventNames = function () { return this._eventsCount > 0 ? Reflect.ownKeys(this._events) : []; }; }, {}], 84: [function (e, t, r) { var n = function () { if ("object" == typeof self && self)
|
1250
|
+
return self; if ("object" == typeof window && window)
|
1251
|
+
return window; throw new Error("Unable to resolve global `this`"); }; t.exports = function () { if (this)
|
1252
|
+
return this; try {
|
1253
|
+
Object.defineProperty(Object.prototype, "__global__", { get: function () { return this; }, configurable: !0 });
|
1254
|
+
}
|
1255
|
+
catch (e) {
|
1256
|
+
return n();
|
1257
|
+
} try {
|
1258
|
+
return __global__ || n();
|
1259
|
+
}
|
1260
|
+
finally {
|
1261
|
+
delete Object.prototype.__global__;
|
1262
|
+
} }(); }, {}], 85: [function (e, t, r) {
|
1263
|
+
"use strict";
|
1264
|
+
t.exports = e("./is-implemented")() ? globalThis : e("./implementation");
|
1265
|
+
}, { "./implementation": 84, "./is-implemented": 86 }], 86: [function (e, t, r) {
|
1266
|
+
"use strict";
|
1267
|
+
t.exports = function () { return "object" == typeof globalThis && (!!globalThis && globalThis.Array === Array); };
|
1268
|
+
}, {}], 87: [function (e, t, r) { r.read = function (e, t, r, n, i) { var o, s, a = 8 * i - n - 1, u = (1 << a) - 1, c = u >> 1, l = -7, f = r ? i - 1 : 0, p = r ? -1 : 1, h = e[t + f]; for (f += p, o = h & (1 << -l) - 1, h >>= -l, l += a; l > 0; o = 256 * o + e[t + f], f += p, l -= 8)
|
1269
|
+
; for (s = o & (1 << -l) - 1, o >>= -l, l += n; l > 0; s = 256 * s + e[t + f], f += p, l -= 8)
|
1270
|
+
; if (0 === o)
|
1271
|
+
o = 1 - c;
|
1272
|
+
else {
|
1273
|
+
if (o === u)
|
1274
|
+
return s ? NaN : 1 / 0 * (h ? -1 : 1);
|
1275
|
+
s += Math.pow(2, n), o -= c;
|
1276
|
+
} return (h ? -1 : 1) * s * Math.pow(2, o - n); }, r.write = function (e, t, r, n, i, o) { var s, a, u, c = 8 * o - i - 1, l = (1 << c) - 1, f = l >> 1, p = 23 === i ? Math.pow(2, -24) - Math.pow(2, -77) : 0, h = n ? 0 : o - 1, d = n ? 1 : -1, g = t < 0 || 0 === t && 1 / t < 0 ? 1 : 0; for (t = Math.abs(t), isNaN(t) || t === 1 / 0 ? (a = isNaN(t) ? 1 : 0, s = l) : (s = Math.floor(Math.log(t) / Math.LN2), t * (u = Math.pow(2, -s)) < 1 && (s--, u *= 2), (t += s + f >= 1 ? p / u : p * Math.pow(2, 1 - f)) * u >= 2 && (s++, u /= 2), s + f >= l ? (a = 0, s = l) : s + f >= 1 ? (a = (t * u - 1) * Math.pow(2, i), s += f) : (a = t * Math.pow(2, f - 1) * Math.pow(2, i), s = 0)); i >= 8; e[r + h] = 255 & a, h += d, a /= 256, i -= 8)
|
1277
|
+
; for (s = s << i | a, c += i; c > 0; e[r + h] = 255 & s, h += d, s /= 256, c -= 8)
|
1278
|
+
; e[r + h - d] |= 128 * g; }; }, {}], 88: [function (e, t, r) { "function" == typeof Object.create ? t.exports = function (e, t) { e.super_ = t, e.prototype = Object.create(t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }); } : t.exports = function (e, t) { e.super_ = t; var r = function () { }; r.prototype = t.prototype, e.prototype = new r, e.prototype.constructor = e; }; }, {}], 89: [function (e, t, r) { function n(e) { return !!e.constructor && "function" == typeof e.constructor.isBuffer && e.constructor.isBuffer(e); } t.exports = function (e) { return null != e && (n(e) || function (e) { return "function" == typeof e.readFloatLE && "function" == typeof e.slice && n(e.slice(0, 0)); }(e) || !!e._isBuffer); }; }, {}], 90: [function (e, t, r) {
|
1279
|
+
"use strict";
|
1280
|
+
var n = e("safe-buffer").Buffer, i = t.exports;
|
1281
|
+
for (var o in i.types = { 0: "reserved", 1: "connect", 2: "connack", 3: "publish", 4: "puback", 5: "pubrec", 6: "pubrel", 7: "pubcomp", 8: "subscribe", 9: "suback", 10: "unsubscribe", 11: "unsuback", 12: "pingreq", 13: "pingresp", 14: "disconnect", 15: "auth" }, i.codes = {}, i.types) {
|
1282
|
+
var s = i.types[o];
|
1283
|
+
i.codes[s] = o;
|
1284
|
+
}
|
1285
|
+
for (var a in i.CMD_SHIFT = 4, i.CMD_MASK = 240, i.DUP_MASK = 8, i.QOS_MASK = 3, i.QOS_SHIFT = 1, i.RETAIN_MASK = 1, i.LENGTH_MASK = 127, i.LENGTH_FIN_MASK = 128, i.SESSIONPRESENT_MASK = 1, i.SESSIONPRESENT_HEADER = n.from([i.SESSIONPRESENT_MASK]), i.CONNACK_HEADER = n.from([i.codes.connack << i.CMD_SHIFT]), i.USERNAME_MASK = 128, i.PASSWORD_MASK = 64, i.WILL_RETAIN_MASK = 32, i.WILL_QOS_MASK = 24, i.WILL_QOS_SHIFT = 3, i.WILL_FLAG_MASK = 4, i.CLEAN_SESSION_MASK = 2, i.CONNECT_HEADER = n.from([i.codes.connect << i.CMD_SHIFT]), i.properties = { sessionExpiryInterval: 17, willDelayInterval: 24, receiveMaximum: 33, maximumPacketSize: 39, topicAliasMaximum: 34, requestResponseInformation: 25, requestProblemInformation: 23, userProperties: 38, authenticationMethod: 21, authenticationData: 22, payloadFormatIndicator: 1, messageExpiryInterval: 2, contentType: 3, responseTopic: 8, correlationData: 9, maximumQoS: 36, retainAvailable: 37, assignedClientIdentifier: 18, reasonString: 31, wildcardSubscriptionAvailable: 40, subscriptionIdentifiersAvailable: 41, sharedSubscriptionAvailable: 42, serverKeepAlive: 19, responseInformation: 26, serverReference: 28, topicAlias: 35, subscriptionIdentifier: 11 }, i.propertiesCodes = {}, i.properties) {
|
1286
|
+
var u = i.properties[a];
|
1287
|
+
i.propertiesCodes[u] = a;
|
1288
|
+
}
|
1289
|
+
function c(e) { return [0, 1, 2].map(function (t) { return [0, 1].map(function (r) { return [0, 1].map(function (o) { var s = new n(1); return s.writeUInt8(i.codes[e] << i.CMD_SHIFT | (r ? i.DUP_MASK : 0) | t << i.QOS_SHIFT | o, 0, !0), s; }); }); }); }
|
1290
|
+
i.propertiesTypes = { sessionExpiryInterval: "int32", willDelayInterval: "int32", receiveMaximum: "int16", maximumPacketSize: "int32", topicAliasMaximum: "int16", requestResponseInformation: "byte", requestProblemInformation: "byte", userProperties: "pair", authenticationMethod: "string", authenticationData: "binary", payloadFormatIndicator: "byte", messageExpiryInterval: "int32", contentType: "string", responseTopic: "string", correlationData: "binary", maximumQoS: "int8", retainAvailable: "byte", assignedClientIdentifier: "string", reasonString: "string", wildcardSubscriptionAvailable: "byte", subscriptionIdentifiersAvailable: "byte", sharedSubscriptionAvailable: "byte", serverKeepAlive: "int32", responseInformation: "string", serverReference: "string", topicAlias: "int16", subscriptionIdentifier: "var" }, i.PUBLISH_HEADER = c("publish"), i.SUBSCRIBE_HEADER = c("subscribe"), i.SUBSCRIBE_OPTIONS_QOS_MASK = 3, i.SUBSCRIBE_OPTIONS_NL_MASK = 1, i.SUBSCRIBE_OPTIONS_NL_SHIFT = 2, i.SUBSCRIBE_OPTIONS_RAP_MASK = 1, i.SUBSCRIBE_OPTIONS_RAP_SHIFT = 3, i.SUBSCRIBE_OPTIONS_RH_MASK = 3, i.SUBSCRIBE_OPTIONS_RH_SHIFT = 4, i.SUBSCRIBE_OPTIONS_RH = [0, 16, 32], i.SUBSCRIBE_OPTIONS_NL = 4, i.SUBSCRIBE_OPTIONS_RAP = 8, i.SUBSCRIBE_OPTIONS_QOS = [0, 1, 2], i.UNSUBSCRIBE_HEADER = c("unsubscribe"), i.ACKS = { unsuback: c("unsuback"), puback: c("puback"), pubcomp: c("pubcomp"), pubrel: c("pubrel"), pubrec: c("pubrec") }, i.SUBACK_HEADER = n.from([i.codes.suback << i.CMD_SHIFT]), i.VERSION3 = n.from([3]), i.VERSION4 = n.from([4]), i.VERSION5 = n.from([5]), i.QOS = [0, 1, 2].map(function (e) { return n.from([e]); }), i.EMPTY = { pingreq: n.from([i.codes.pingreq << 4, 0]), pingresp: n.from([i.codes.pingresp << 4, 0]), disconnect: n.from([i.codes.disconnect << 4, 0]) };
|
1291
|
+
}, { "safe-buffer": 118 }], 91: [function (e, t, r) {
|
1292
|
+
"use strict";
|
1293
|
+
var n = e("safe-buffer").Buffer, i = e("./writeToStream"), o = e("events").EventEmitter;
|
1294
|
+
function s() { this._array = new Array(20), this._i = 0; }
|
1295
|
+
e("inherits")(s, o), s.prototype.write = function (e) { return this._array[this._i++] = e, !0; }, s.prototype.concat = function () { var e, t, r = 0, i = new Array(this._array.length), o = this._array, s = 0; for (e = 0; e < o.length && void 0 !== o[e]; e++)
|
1296
|
+
"string" != typeof o[e] ? i[e] = o[e].length : i[e] = n.byteLength(o[e]), r += i[e]; for (t = n.allocUnsafe(r), e = 0; e < o.length && void 0 !== o[e]; e++)
|
1297
|
+
"string" != typeof o[e] ? (o[e].copy(t, s), s += i[e]) : (t.write(o[e], s), s += i[e]); return t; }, t.exports = function (e, t) { var r = new s; return i(e, r, t), r.concat(); };
|
1298
|
+
}, { "./writeToStream": 97, events: 83, inherits: 88, "safe-buffer": 118 }], 92: [function (e, t, r) {
|
1299
|
+
"use strict";
|
1300
|
+
r.parser = e("./parser"), r.generate = e("./generate"), r.writeToStream = e("./writeToStream");
|
1301
|
+
}, { "./generate": 91, "./parser": 96, "./writeToStream": 97 }], 93: [function (e, t, r) { var n = e("readable-stream/duplex"), i = e("util"), o = e("safe-buffer").Buffer; function s(e) { if (!(this instanceof s))
|
1302
|
+
return new s(e); if (this._bufs = [], this.length = 0, "function" == typeof e) {
|
1303
|
+
this._callback = e;
|
1304
|
+
var t = function (e) { this._callback && (this._callback(e), this._callback = null); }.bind(this);
|
1305
|
+
this.on("pipe", function (e) { e.on("error", t); }), this.on("unpipe", function (e) { e.removeListener("error", t); });
|
1306
|
+
}
|
1307
|
+
else
|
1308
|
+
this.append(e); n.call(this); } i.inherits(s, n), s.prototype._offset = function (e) { var t, r = 0, n = 0; if (0 === e)
|
1309
|
+
return [0, 0]; for (; n < this._bufs.length; n++) {
|
1310
|
+
if (e < (t = r + this._bufs[n].length) || n == this._bufs.length - 1)
|
1311
|
+
return [n, e - r];
|
1312
|
+
r = t;
|
1313
|
+
} }, s.prototype.append = function (e) { var t = 0; if (o.isBuffer(e))
|
1314
|
+
this._appendBuffer(e);
|
1315
|
+
else if (Array.isArray(e))
|
1316
|
+
for (; t < e.length; t++)
|
1317
|
+
this.append(e[t]);
|
1318
|
+
else if (e instanceof s)
|
1319
|
+
for (; t < e._bufs.length; t++)
|
1320
|
+
this.append(e._bufs[t]);
|
1321
|
+
else
|
1322
|
+
null != e && ("number" == typeof e && (e = e.toString()), this._appendBuffer(o.from(e))); return this; }, s.prototype._appendBuffer = function (e) { this._bufs.push(e), this.length += e.length; }, s.prototype._write = function (e, t, r) { this._appendBuffer(e), "function" == typeof r && r(); }, s.prototype._read = function (e) { if (!this.length)
|
1323
|
+
return this.push(null); e = Math.min(e, this.length), this.push(this.slice(0, e)), this.consume(e); }, s.prototype.end = function (e) { n.prototype.end.call(this, e), this._callback && (this._callback(null, this.slice()), this._callback = null); }, s.prototype.get = function (e) { return this.slice(e, e + 1)[0]; }, s.prototype.slice = function (e, t) { return "number" == typeof e && e < 0 && (e += this.length), "number" == typeof t && t < 0 && (t += this.length), this.copy(null, 0, e, t); }, s.prototype.copy = function (e, t, r, n) { if (("number" != typeof r || r < 0) && (r = 0), ("number" != typeof n || n > this.length) && (n = this.length), r >= this.length)
|
1324
|
+
return e || o.alloc(0); if (n <= 0)
|
1325
|
+
return e || o.alloc(0); var i, s, a = !!e, u = this._offset(r), c = n - r, l = c, f = a && t || 0, p = u[1]; if (0 === r && n == this.length) {
|
1326
|
+
if (!a)
|
1327
|
+
return 1 === this._bufs.length ? this._bufs[0] : o.concat(this._bufs, this.length);
|
1328
|
+
for (s = 0; s < this._bufs.length; s++)
|
1329
|
+
this._bufs[s].copy(e, f), f += this._bufs[s].length;
|
1330
|
+
return e;
|
1331
|
+
} if (l <= this._bufs[u[0]].length - p)
|
1332
|
+
return a ? this._bufs[u[0]].copy(e, t, p, p + l) : this._bufs[u[0]].slice(p, p + l); for (a || (e = o.allocUnsafe(c)), s = u[0]; s < this._bufs.length; s++) {
|
1333
|
+
if (!(l > (i = this._bufs[s].length - p))) {
|
1334
|
+
this._bufs[s].copy(e, f, p, p + l);
|
1335
|
+
break;
|
1336
|
+
}
|
1337
|
+
this._bufs[s].copy(e, f, p), f += i, l -= i, p && (p = 0);
|
1338
|
+
} return e; }, s.prototype.shallowSlice = function (e, t) { e = e || 0, t = t || this.length, e < 0 && (e += this.length), t < 0 && (t += this.length); var r = this._offset(e), n = this._offset(t), i = this._bufs.slice(r[0], n[0] + 1); return 0 == n[1] ? i.pop() : i[i.length - 1] = i[i.length - 1].slice(0, n[1]), 0 != r[1] && (i[0] = i[0].slice(r[1])), new s(i); }, s.prototype.toString = function (e, t, r) { return this.slice(t, r).toString(e); }, s.prototype.consume = function (e) { for (; this._bufs.length;) {
|
1339
|
+
if (!(e >= this._bufs[0].length)) {
|
1340
|
+
this._bufs[0] = this._bufs[0].slice(e), this.length -= e;
|
1341
|
+
break;
|
1342
|
+
}
|
1343
|
+
e -= this._bufs[0].length, this.length -= this._bufs[0].length, this._bufs.shift();
|
1344
|
+
} return this; }, s.prototype.duplicate = function () { for (var e = 0, t = new s; e < this._bufs.length; e++)
|
1345
|
+
t.append(this._bufs[e]); return t; }, s.prototype.destroy = function () { this._bufs.length = 0, this.length = 0, this.push(null); }, function () { var e = { readDoubleBE: 8, readDoubleLE: 8, readFloatBE: 4, readFloatLE: 4, readInt32BE: 4, readInt32LE: 4, readUInt32BE: 4, readUInt32LE: 4, readInt16BE: 2, readInt16LE: 2, readUInt16BE: 2, readUInt16LE: 2, readInt8: 1, readUInt8: 1 }; for (var t in e)
|
1346
|
+
!function (t) { s.prototype[t] = function (r) { return this.slice(r, r + e[t])[t](0); }; }(t); }(), t.exports = s; }, { "readable-stream/duplex": 105, "safe-buffer": 118, util: 136 }], 94: [function (e, t, r) {
|
1347
|
+
"use strict";
|
1348
|
+
var n = e("safe-buffer").Buffer, i = 65536, o = {};
|
1349
|
+
function s(e) { var t = n.allocUnsafe(2); return t.writeUInt8(e >> 8, 0), t.writeUInt8(255 & e, 1), t; }
|
1350
|
+
t.exports = { cache: o, generateCache: function () { for (var e = 0; e < i; e++)
|
1351
|
+
o[e] = s(e); }, generateNumber: s, genBufVariableByteInt: function (e) { var t = 0, r = 0, i = function (e) { return e >= 0 && e < 128 ? 1 : e >= 128 && e < 16384 ? 2 : e >= 16384 && e < 2097152 ? 3 : e >= 2097152 && e < 268435456 ? 4 : 0; }(e), o = n.allocUnsafe(i); do {
|
1352
|
+
t = e % 128 | 0, (e = e / 128 | 0) > 0 && (t |= 128), o.writeUInt8(t, r++);
|
1353
|
+
} while (e > 0); return { data: o, length: i }; }, generate4ByteBuffer: function (e) { var t = n.allocUnsafe(4); return t.writeUInt32BE(e, 0), t; } };
|
1354
|
+
}, { "safe-buffer": 118 }], 95: [function (e, t, r) { t.exports = function () { this.cmd = null, this.retain = !1, this.qos = 0, this.dup = !1, this.length = -1, this.topic = null, this.payload = null; }; }, {}], 96: [function (e, t, r) {
|
1355
|
+
"use strict";
|
1356
|
+
var n = e("bl"), i = e("inherits"), o = e("events").EventEmitter, s = e("./packet"), a = e("./constants");
|
1357
|
+
function u(e) { if (!(this instanceof u))
|
1358
|
+
return new u(e); this.settings = e || {}, this._states = ["_parseHeader", "_parseLength", "_parsePayload", "_newPacket"], this._resetState(); }
|
1359
|
+
i(u, o), u.prototype._resetState = function () { this.packet = new s, this.error = null, this._list = n(), this._stateCounter = 0; }, u.prototype.parse = function (e) { for (this.error && this._resetState(), this._list.append(e); (-1 !== this.packet.length || this._list.length > 0) && this[this._states[this._stateCounter]]() && !this.error;)
|
1360
|
+
this._stateCounter++, this._stateCounter >= this._states.length && (this._stateCounter = 0); return this._list.length; }, u.prototype._parseHeader = function () { var e = this._list.readUInt8(0); return this.packet.cmd = a.types[e >> a.CMD_SHIFT], this.packet.retain = 0 != (e & a.RETAIN_MASK), this.packet.qos = e >> a.QOS_SHIFT & a.QOS_MASK, this.packet.dup = 0 != (e & a.DUP_MASK), this._list.consume(1), !0; }, u.prototype._parseLength = function () { var e = this._parseVarByteNum(!0); return e && (this.packet.length = e.value, this._list.consume(e.bytes)), !!e; }, u.prototype._parsePayload = function () { var e = !1; if (0 === this.packet.length || this._list.length >= this.packet.length) {
|
1361
|
+
switch (this._pos = 0, this.packet.cmd) {
|
1362
|
+
case "connect":
|
1363
|
+
this._parseConnect();
|
1364
|
+
break;
|
1365
|
+
case "connack":
|
1366
|
+
this._parseConnack();
|
1367
|
+
break;
|
1368
|
+
case "publish":
|
1369
|
+
this._parsePublish();
|
1370
|
+
break;
|
1371
|
+
case "puback":
|
1372
|
+
case "pubrec":
|
1373
|
+
case "pubrel":
|
1374
|
+
case "pubcomp":
|
1375
|
+
this._parseConfirmation();
|
1376
|
+
break;
|
1377
|
+
case "subscribe":
|
1378
|
+
this._parseSubscribe();
|
1379
|
+
break;
|
1380
|
+
case "suback":
|
1381
|
+
this._parseSuback();
|
1382
|
+
break;
|
1383
|
+
case "unsubscribe":
|
1384
|
+
this._parseUnsubscribe();
|
1385
|
+
break;
|
1386
|
+
case "unsuback":
|
1387
|
+
this._parseUnsuback();
|
1388
|
+
break;
|
1389
|
+
case "pingreq":
|
1390
|
+
case "pingresp": break;
|
1391
|
+
case "disconnect":
|
1392
|
+
this._parseDisconnect();
|
1393
|
+
break;
|
1394
|
+
case "auth":
|
1395
|
+
this._parseAuth();
|
1396
|
+
break;
|
1397
|
+
default: this._emitError(new Error("Not supported"));
|
1398
|
+
}
|
1399
|
+
e = !0;
|
1400
|
+
} return e; }, u.prototype._parseConnect = function () { var e, t, r, n, i, o, s = {}, u = this.packet; if (null === (e = this._parseString()))
|
1401
|
+
return this._emitError(new Error("Cannot parse protocolId")); if ("MQTT" !== e && "MQIsdp" !== e)
|
1402
|
+
return this._emitError(new Error("Invalid protocolId")); if (u.protocolId = e, this._pos >= this._list.length)
|
1403
|
+
return this._emitError(new Error("Packet too short")); if (u.protocolVersion = this._list.readUInt8(this._pos), 3 !== u.protocolVersion && 4 !== u.protocolVersion && 5 !== u.protocolVersion)
|
1404
|
+
return this._emitError(new Error("Invalid protocol version")); if (this._pos++, this._pos >= this._list.length)
|
1405
|
+
return this._emitError(new Error("Packet too short")); if (s.username = this._list.readUInt8(this._pos) & a.USERNAME_MASK, s.password = this._list.readUInt8(this._pos) & a.PASSWORD_MASK, s.will = this._list.readUInt8(this._pos) & a.WILL_FLAG_MASK, s.will && (u.will = {}, u.will.retain = 0 != (this._list.readUInt8(this._pos) & a.WILL_RETAIN_MASK), u.will.qos = (this._list.readUInt8(this._pos) & a.WILL_QOS_MASK) >> a.WILL_QOS_SHIFT), u.clean = 0 != (this._list.readUInt8(this._pos) & a.CLEAN_SESSION_MASK), this._pos++, u.keepalive = this._parseNum(), -1 === u.keepalive)
|
1406
|
+
return this._emitError(new Error("Packet too short")); if (5 === u.protocolVersion) {
|
1407
|
+
var c = this._parseProperties();
|
1408
|
+
Object.getOwnPropertyNames(c).length && (u.properties = c);
|
1409
|
+
} if (null === (t = this._parseString()))
|
1410
|
+
return this._emitError(new Error("Packet too short")); if (u.clientId = t, s.will) {
|
1411
|
+
if (5 === u.protocolVersion) {
|
1412
|
+
var l = this._parseProperties();
|
1413
|
+
Object.getOwnPropertyNames(l).length && (u.will.properties = l);
|
1414
|
+
}
|
1415
|
+
if (null === (r = this._parseString()))
|
1416
|
+
return this._emitError(new Error("Cannot parse will topic"));
|
1417
|
+
if (u.will.topic = r, null === (n = this._parseBuffer()))
|
1418
|
+
return this._emitError(new Error("Cannot parse will payload"));
|
1419
|
+
u.will.payload = n;
|
1420
|
+
} if (s.username) {
|
1421
|
+
if (null === (o = this._parseString()))
|
1422
|
+
return this._emitError(new Error("Cannot parse username"));
|
1423
|
+
u.username = o;
|
1424
|
+
} if (s.password) {
|
1425
|
+
if (null === (i = this._parseBuffer()))
|
1426
|
+
return this._emitError(new Error("Cannot parse password"));
|
1427
|
+
u.password = i;
|
1428
|
+
} return this.settings = u, u; }, u.prototype._parseConnack = function () { var e = this.packet; if (this._list.length < 2)
|
1429
|
+
return null; if (e.sessionPresent = !!(this._list.readUInt8(this._pos++) & a.SESSIONPRESENT_MASK), 5 === this.settings.protocolVersion ? e.reasonCode = this._list.readUInt8(this._pos++) : e.returnCode = this._list.readUInt8(this._pos++), -1 === e.returnCode || -1 === e.reasonCode)
|
1430
|
+
return this._emitError(new Error("Cannot parse return code")); if (5 === this.settings.protocolVersion) {
|
1431
|
+
var t = this._parseProperties();
|
1432
|
+
Object.getOwnPropertyNames(t).length && (e.properties = t);
|
1433
|
+
} }, u.prototype._parsePublish = function () { var e = this.packet; if (e.topic = this._parseString(), null === e.topic)
|
1434
|
+
return this._emitError(new Error("Cannot parse topic")); if (!(e.qos > 0) || this._parseMessageId()) {
|
1435
|
+
if (5 === this.settings.protocolVersion) {
|
1436
|
+
var t = this._parseProperties();
|
1437
|
+
Object.getOwnPropertyNames(t).length && (e.properties = t);
|
1438
|
+
}
|
1439
|
+
e.payload = this._list.slice(this._pos, e.length);
|
1440
|
+
} }, u.prototype._parseSubscribe = function () { var e, t, r, n, i, o, s, u = this.packet; if (1 !== u.qos)
|
1441
|
+
return this._emitError(new Error("Wrong subscribe header")); if (u.subscriptions = [], this._parseMessageId()) {
|
1442
|
+
if (5 === this.settings.protocolVersion) {
|
1443
|
+
var c = this._parseProperties();
|
1444
|
+
Object.getOwnPropertyNames(c).length && (u.properties = c);
|
1445
|
+
}
|
1446
|
+
for (; this._pos < u.length;) {
|
1447
|
+
if (null === (e = this._parseString()))
|
1448
|
+
return this._emitError(new Error("Cannot parse topic"));
|
1449
|
+
r = (t = this._parseByte()) & a.SUBSCRIBE_OPTIONS_QOS_MASK, o = 0 != (t >> a.SUBSCRIBE_OPTIONS_NL_SHIFT & a.SUBSCRIBE_OPTIONS_NL_MASK), i = 0 != (t >> a.SUBSCRIBE_OPTIONS_RAP_SHIFT & a.SUBSCRIBE_OPTIONS_RAP_MASK), n = t >> a.SUBSCRIBE_OPTIONS_RH_SHIFT & a.SUBSCRIBE_OPTIONS_RH_MASK, s = { topic: e, qos: r }, 5 === this.settings.protocolVersion && (s.nl = o, s.rap = i, s.rh = n), u.subscriptions.push(s);
|
1450
|
+
}
|
1451
|
+
} }, u.prototype._parseSuback = function () { var e = this.packet; if (this.packet.granted = [], this._parseMessageId()) {
|
1452
|
+
if (5 === this.settings.protocolVersion) {
|
1453
|
+
var t = this._parseProperties();
|
1454
|
+
Object.getOwnPropertyNames(t).length && (e.properties = t);
|
1455
|
+
}
|
1456
|
+
for (; this._pos < this.packet.length;)
|
1457
|
+
this.packet.granted.push(this._list.readUInt8(this._pos++));
|
1458
|
+
} }, u.prototype._parseUnsubscribe = function () { var e = this.packet; if (e.unsubscriptions = [], this._parseMessageId()) {
|
1459
|
+
if (5 === this.settings.protocolVersion) {
|
1460
|
+
var t = this._parseProperties();
|
1461
|
+
Object.getOwnPropertyNames(t).length && (e.properties = t);
|
1462
|
+
}
|
1463
|
+
for (; this._pos < e.length;) {
|
1464
|
+
var r;
|
1465
|
+
if (null === (r = this._parseString()))
|
1466
|
+
return this._emitError(new Error("Cannot parse topic"));
|
1467
|
+
e.unsubscriptions.push(r);
|
1468
|
+
}
|
1469
|
+
} }, u.prototype._parseUnsuback = function () { var e = this.packet; if (!this._parseMessageId())
|
1470
|
+
return this._emitError(new Error("Cannot parse messageId")); if (5 === this.settings.protocolVersion) {
|
1471
|
+
var t = this._parseProperties();
|
1472
|
+
for (Object.getOwnPropertyNames(t).length && (e.properties = t), e.granted = []; this._pos < this.packet.length;)
|
1473
|
+
this.packet.granted.push(this._list.readUInt8(this._pos++));
|
1474
|
+
} }, u.prototype._parseConfirmation = function () { var e = this.packet; if (this._parseMessageId(), 5 === this.settings.protocolVersion && e.length > 2) {
|
1475
|
+
e.reasonCode = this._parseByte();
|
1476
|
+
var t = this._parseProperties();
|
1477
|
+
Object.getOwnPropertyNames(t).length && (e.properties = t);
|
1478
|
+
} return !0; }, u.prototype._parseDisconnect = function () { var e = this.packet; if (5 === this.settings.protocolVersion) {
|
1479
|
+
e.reasonCode = this._parseByte();
|
1480
|
+
var t = this._parseProperties();
|
1481
|
+
Object.getOwnPropertyNames(t).length && (e.properties = t);
|
1482
|
+
} return !0; }, u.prototype._parseAuth = function () { var e = this.packet; if (5 !== this.settings.protocolVersion)
|
1483
|
+
return this._emitError(new Error("Not supported auth packet for this version MQTT")); e.reasonCode = this._parseByte(); var t = this._parseProperties(); return Object.getOwnPropertyNames(t).length && (e.properties = t), !0; }, u.prototype._parseMessageId = function () { var e = this.packet; return e.messageId = this._parseNum(), null !== e.messageId || (this._emitError(new Error("Cannot parse messageId")), !1); }, u.prototype._parseString = function (e) { var t, r = this._parseNum(), n = r + this._pos; return -1 === r || n > this._list.length || n > this.packet.length ? null : (t = this._list.toString("utf8", this._pos, n), this._pos += r, t); }, u.prototype._parseStringPair = function () { return { name: this._parseString(), value: this._parseString() }; }, u.prototype._parseBuffer = function () { var e, t = this._parseNum(), r = t + this._pos; return -1 === t || r > this._list.length || r > this.packet.length ? null : (e = this._list.slice(this._pos, r), this._pos += t, e); }, u.prototype._parseNum = function () { if (this._list.length - this._pos < 2)
|
1484
|
+
return -1; var e = this._list.readUInt16BE(this._pos); return this._pos += 2, e; }, u.prototype._parse4ByteNum = function () { if (this._list.length - this._pos < 4)
|
1485
|
+
return -1; var e = this._list.readUInt32BE(this._pos); return this._pos += 4, e; }, u.prototype._parseVarByteNum = function (e) { for (var t, r = 0, n = 1, i = 0, o = !0, s = this._pos ? this._pos : 0; r < 5 && (i += n * ((t = this._list.readUInt8(s + r++)) & a.LENGTH_MASK), n *= 128, 0 != (t & a.LENGTH_FIN_MASK));)
|
1486
|
+
if (this._list.length <= r) {
|
1487
|
+
o = !1;
|
1488
|
+
break;
|
1489
|
+
} return s && (this._pos += r), o = !!o && (e ? { bytes: r, value: i } : i); }, u.prototype._parseByte = function () { var e = this._list.readUInt8(this._pos); return this._pos++, e; }, u.prototype._parseByType = function (e) { switch (e) {
|
1490
|
+
case "byte": return 0 !== this._parseByte();
|
1491
|
+
case "int8": return this._parseByte();
|
1492
|
+
case "int16": return this._parseNum();
|
1493
|
+
case "int32": return this._parse4ByteNum();
|
1494
|
+
case "var": return this._parseVarByteNum();
|
1495
|
+
case "string": return this._parseString();
|
1496
|
+
case "pair": return this._parseStringPair();
|
1497
|
+
case "binary": return this._parseBuffer();
|
1498
|
+
} }, u.prototype._parseProperties = function () { for (var e = this._parseVarByteNum(), t = this._pos + e, r = {}; this._pos < t;) {
|
1499
|
+
var n = this._parseByte(), i = a.propertiesCodes[n];
|
1500
|
+
if (!i)
|
1501
|
+
return this._emitError(new Error("Unknown property")), !1;
|
1502
|
+
if ("userProperties" !== i)
|
1503
|
+
r[i] = this._parseByType(a.propertiesTypes[i]);
|
1504
|
+
else {
|
1505
|
+
r[i] || (r[i] = {});
|
1506
|
+
var o = this._parseByType(a.propertiesTypes[i]);
|
1507
|
+
r[i][o.name] = o.value;
|
1508
|
+
}
|
1509
|
+
} return r; }, u.prototype._newPacket = function () { return this.packet && (this._list.consume(this.packet.length), this.emit("packet", this.packet)), this.packet = new s, this._pos = 0, !0; }, u.prototype._emitError = function (e) { this.error = e, this.emit("error", e); }, t.exports = u;
|
1510
|
+
}, { "./constants": 90, "./packet": 95, bl: 93, events: 83, inherits: 88 }], 97: [function (e, t, r) {
|
1511
|
+
"use strict";
|
1512
|
+
var n = e("./constants"), i = e("safe-buffer").Buffer, o = i.allocUnsafe(0), s = i.from([0]), a = e("./numbers"), u = e("process-nextick-args").nextTick, c = a.cache, l = a.generateNumber, f = a.generateCache, p = a.genBufVariableByteInt, h = a.generate4ByteBuffer, d = S, g = !0;
|
1513
|
+
function b(e, t, r) { switch ((t.cork && (t.cork(), u(y, t)), g && (g = !1, f()), e.cmd)) {
|
1514
|
+
case "connect": return function (e, t, r) { var o = e || {}, s = o.protocolId || "MQTT", a = o.protocolVersion || 4, u = o.will, c = o.clean, l = o.keepalive || 0, f = o.clientId || "", p = o.username, h = o.password, g = o.properties; void 0 === c && (c = !0); var b = 0; if (!s || "string" != typeof s && !i.isBuffer(s))
|
1515
|
+
return t.emit("error", new Error("Invalid protocolId")), !1; b += s.length + 2; if (3 !== a && 4 !== a && 5 !== a)
|
1516
|
+
return t.emit("error", new Error("Invalid protocol version")), !1; b += 1; if ("string" != typeof f && !i.isBuffer(f) || !f && 4 !== a || !f && !c) {
|
1517
|
+
if (a < 4)
|
1518
|
+
return t.emit("error", new Error("clientId must be supplied before 3.1.1")), !1;
|
1519
|
+
if (1 * c == 0)
|
1520
|
+
return t.emit("error", new Error("clientId must be given if cleanSession set to 0")), !1;
|
1521
|
+
}
|
1522
|
+
else
|
1523
|
+
b += f.length + 2; if ("number" != typeof l || l < 0 || l > 65535 || l % 1 != 0)
|
1524
|
+
return t.emit("error", new Error("Invalid keepalive")), !1; b += 2; if (b += 1, 5 === a) {
|
1525
|
+
var y = I(t, g);
|
1526
|
+
b += y.length;
|
1527
|
+
} if (u) {
|
1528
|
+
if ("object" != typeof u)
|
1529
|
+
return t.emit("error", new Error("Invalid will")), !1;
|
1530
|
+
if (!u.topic || "string" != typeof u.topic)
|
1531
|
+
return t.emit("error", new Error("Invalid will topic")), !1;
|
1532
|
+
if (b += i.byteLength(u.topic) + 2, u.payload) {
|
1533
|
+
if (!(u.payload.length >= 0))
|
1534
|
+
return t.emit("error", new Error("Invalid will payload")), !1;
|
1535
|
+
"string" == typeof u.payload ? b += i.byteLength(u.payload) + 2 : b += u.payload.length + 2;
|
1536
|
+
var m = {};
|
1537
|
+
5 === a && (m = I(t, u.properties), b += m.length);
|
1538
|
+
}
|
1539
|
+
} var w = !1; if (null != p) {
|
1540
|
+
if (!T(p))
|
1541
|
+
return t.emit("error", new Error("Invalid username")), !1;
|
1542
|
+
w = !0, b += i.byteLength(p) + 2;
|
1543
|
+
} if (null != h) {
|
1544
|
+
if (!w)
|
1545
|
+
return t.emit("error", new Error("Username is required to use password")), !1;
|
1546
|
+
if (!T(h))
|
1547
|
+
return t.emit("error", new Error("Invalid password")), !1;
|
1548
|
+
b += j(h) + 2;
|
1549
|
+
} t.write(n.CONNECT_HEADER), _(t, b), E(t, s), t.write(4 === a ? n.VERSION4 : 5 === a ? n.VERSION5 : n.VERSION3); var S = 0; S |= null != p ? n.USERNAME_MASK : 0, S |= null != h ? n.PASSWORD_MASK : 0, S |= u && u.retain ? n.WILL_RETAIN_MASK : 0, S |= u && u.qos ? u.qos << n.WILL_QOS_SHIFT : 0, S |= u ? n.WILL_FLAG_MASK : 0, S |= c ? n.CLEAN_SESSION_MASK : 0, t.write(i.from([S])), d(t, l), 5 === a && y.write(); E(t, f), u && (5 === a && m.write(), v(t, u.topic), E(t, u.payload)); null != p && E(t, p); null != h && E(t, h); return !0; }(e, t);
|
1550
|
+
case "connack": return function (e, t, r) { var o = r ? r.protocolVersion : 4, a = e || {}, u = 5 === o ? a.reasonCode : a.returnCode, c = a.properties, l = 2; if ("number" != typeof u)
|
1551
|
+
return t.emit("error", new Error("Invalid return code")), !1; var f = null; 5 === o && (f = I(t, c), l += f.length); t.write(n.CONNACK_HEADER), _(t, l), t.write(a.sessionPresent ? n.SESSIONPRESENT_HEADER : s), t.write(i.from([u])), null != f && f.write(); return !0; }(e, t, r);
|
1552
|
+
case "publish": return function (e, t, r) { var s = r ? r.protocolVersion : 4, a = e || {}, u = a.qos || 0, c = a.retain ? n.RETAIN_MASK : 0, l = a.topic, f = a.payload || o, p = a.messageId, h = a.properties, g = 0; if ("string" == typeof l)
|
1553
|
+
g += i.byteLength(l) + 2;
|
1554
|
+
else {
|
1555
|
+
if (!i.isBuffer(l))
|
1556
|
+
return t.emit("error", new Error("Invalid topic")), !1;
|
1557
|
+
g += l.length + 2;
|
1558
|
+
} i.isBuffer(f) ? g += f.length : g += i.byteLength(f); if (u && "number" != typeof p)
|
1559
|
+
return t.emit("error", new Error("Invalid messageId")), !1; u && (g += 2); var b = null; 5 === s && (b = I(t, h), g += b.length); t.write(n.PUBLISH_HEADER[u][a.dup ? 1 : 0][c ? 1 : 0]), _(t, g), d(t, j(l)), t.write(l), u > 0 && d(t, p); null != b && b.write(); return t.write(f); }(e, t, r);
|
1560
|
+
case "puback":
|
1561
|
+
case "pubrec":
|
1562
|
+
case "pubrel":
|
1563
|
+
case "pubcomp": return function (e, t, r) { var o = r ? r.protocolVersion : 4, s = e || {}, a = s.cmd || "puback", u = s.messageId, c = s.dup && "pubrel" === a ? n.DUP_MASK : 0, l = 0, f = s.reasonCode, p = s.properties, h = 5 === o ? 3 : 2; "pubrel" === a && (l = 1); if ("number" != typeof u)
|
1564
|
+
return t.emit("error", new Error("Invalid messageId")), !1; var g = null; if (5 === o) {
|
1565
|
+
if (!(g = C(t, p, r, h)))
|
1566
|
+
return !1;
|
1567
|
+
h += g.length;
|
1568
|
+
} t.write(n.ACKS[a][l][c][0]), _(t, h), d(t, u), 5 === o && t.write(i.from([f])); null !== g && g.write(); return !0; }(e, t, r);
|
1569
|
+
case "subscribe": return function (e, t, r) { var o = r ? r.protocolVersion : 4, s = e || {}, a = s.dup ? n.DUP_MASK : 0, u = s.messageId, c = s.subscriptions, l = s.properties, f = 0; if ("number" != typeof u)
|
1570
|
+
return t.emit("error", new Error("Invalid messageId")), !1; f += 2; var p = null; 5 === o && (p = I(t, l), f += p.length); if ("object" != typeof c || !c.length)
|
1571
|
+
return t.emit("error", new Error("Invalid subscriptions")), !1; for (var h = 0; h < c.length; h += 1) {
|
1572
|
+
var g = c[h].topic, b = c[h].qos;
|
1573
|
+
if ("string" != typeof g)
|
1574
|
+
return t.emit("error", new Error("Invalid subscriptions - invalid topic")), !1;
|
1575
|
+
if ("number" != typeof b)
|
1576
|
+
return t.emit("error", new Error("Invalid subscriptions - invalid qos")), !1;
|
1577
|
+
if (5 === o) {
|
1578
|
+
var y = c[h].nl || !1;
|
1579
|
+
if ("boolean" != typeof y)
|
1580
|
+
return t.emit("error", new Error("Invalid subscriptions - invalid No Local")), !1;
|
1581
|
+
var m = c[h].rap || !1;
|
1582
|
+
if ("boolean" != typeof m)
|
1583
|
+
return t.emit("error", new Error("Invalid subscriptions - invalid Retain as Published")), !1;
|
1584
|
+
var w = c[h].rh || 0;
|
1585
|
+
if ("number" != typeof w || w > 2)
|
1586
|
+
return t.emit("error", new Error("Invalid subscriptions - invalid Retain Handling")), !1;
|
1587
|
+
}
|
1588
|
+
f += i.byteLength(g) + 2 + 1;
|
1589
|
+
} t.write(n.SUBSCRIBE_HEADER[1][a ? 1 : 0][0]), _(t, f), d(t, u), null !== p && p.write(); for (var S = !0, x = 0; x < c.length; x++) {
|
1590
|
+
var k, E = c[x], C = E.topic, O = E.qos, j = +E.nl, T = +E.rap, A = E.rh;
|
1591
|
+
v(t, C), k = n.SUBSCRIBE_OPTIONS_QOS[O], 5 === o && (k |= j ? n.SUBSCRIBE_OPTIONS_NL : 0, k |= T ? n.SUBSCRIBE_OPTIONS_RAP : 0, k |= A ? n.SUBSCRIBE_OPTIONS_RH[A] : 0), S = t.write(i.from([k]));
|
1592
|
+
} return S; }(e, t, r);
|
1593
|
+
case "suback": return function (e, t, r) { var o = r ? r.protocolVersion : 4, s = e || {}, a = s.messageId, u = s.granted, c = s.properties, l = 0; if ("number" != typeof a)
|
1594
|
+
return t.emit("error", new Error("Invalid messageId")), !1; l += 2; if ("object" != typeof u || !u.length)
|
1595
|
+
return t.emit("error", new Error("Invalid qos vector")), !1; for (var f = 0; f < u.length; f += 1) {
|
1596
|
+
if ("number" != typeof u[f])
|
1597
|
+
return t.emit("error", new Error("Invalid qos vector")), !1;
|
1598
|
+
l += 1;
|
1599
|
+
} var p = null; if (5 === o) {
|
1600
|
+
if (!(p = C(t, c, r, l)))
|
1601
|
+
return !1;
|
1602
|
+
l += p.length;
|
1603
|
+
} t.write(n.SUBACK_HEADER), _(t, l), d(t, a), null !== p && p.write(); return t.write(i.from(u)); }(e, t, r);
|
1604
|
+
case "unsubscribe": return function (e, t, r) { var o = r ? r.protocolVersion : 4, s = e || {}, a = s.messageId, u = s.dup ? n.DUP_MASK : 0, c = s.unsubscriptions, l = s.properties, f = 0; if ("number" != typeof a)
|
1605
|
+
return t.emit("error", new Error("Invalid messageId")), !1; f += 2; if ("object" != typeof c || !c.length)
|
1606
|
+
return t.emit("error", new Error("Invalid unsubscriptions")), !1; for (var p = 0; p < c.length; p += 1) {
|
1607
|
+
if ("string" != typeof c[p])
|
1608
|
+
return t.emit("error", new Error("Invalid unsubscriptions")), !1;
|
1609
|
+
f += i.byteLength(c[p]) + 2;
|
1610
|
+
} var h = null; 5 === o && (h = I(t, l), f += h.length); t.write(n.UNSUBSCRIBE_HEADER[1][u ? 1 : 0][0]), _(t, f), d(t, a), null !== h && h.write(); for (var g = !0, b = 0; b < c.length; b++)
|
1611
|
+
g = v(t, c[b]); return g; }(e, t, r);
|
1612
|
+
case "unsuback": return function (e, t, r) { var o = r ? r.protocolVersion : 4, s = e || {}, a = s.messageId, u = s.dup ? n.DUP_MASK : 0, c = s.granted, l = s.properties, f = s.cmd, p = 2; if ("number" != typeof a)
|
1613
|
+
return t.emit("error", new Error("Invalid messageId")), !1; if (5 === o) {
|
1614
|
+
if ("object" != typeof c || !c.length)
|
1615
|
+
return t.emit("error", new Error("Invalid qos vector")), !1;
|
1616
|
+
for (var h = 0; h < c.length; h += 1) {
|
1617
|
+
if ("number" != typeof c[h])
|
1618
|
+
return t.emit("error", new Error("Invalid qos vector")), !1;
|
1619
|
+
p += 1;
|
1620
|
+
}
|
1621
|
+
} var g = null; if (5 === o) {
|
1622
|
+
if (!(g = C(t, l, r, p)))
|
1623
|
+
return !1;
|
1624
|
+
p += g.length;
|
1625
|
+
} t.write(n.ACKS[f][0][u][0]), _(t, p), d(t, a), null !== g && g.write(); 5 === o && t.write(i.from(c)); return !0; }(e, t, r);
|
1626
|
+
case "pingreq":
|
1627
|
+
case "pingresp": return function (e, t, r) { return t.write(n.EMPTY[e.cmd]); }(e, t);
|
1628
|
+
case "disconnect": return function (e, t, r) { var o = r ? r.protocolVersion : 4, s = e || {}, a = s.reasonCode, u = s.properties, c = 5 === o ? 1 : 0, l = null; if (5 === o) {
|
1629
|
+
if (!(l = C(t, u, r, c)))
|
1630
|
+
return !1;
|
1631
|
+
c += l.length;
|
1632
|
+
} t.write(i.from([n.codes.disconnect << 4])), _(t, c), 5 === o && t.write(i.from([a])); null !== l && l.write(); return !0; }(e, t, r);
|
1633
|
+
case "auth": return function (e, t, r) { var o = r ? r.protocolVersion : 4, s = e || {}, a = s.reasonCode, u = s.properties, c = 5 === o ? 1 : 0; 5 !== o && t.emit("error", new Error("Invalid mqtt version for auth packet")); var l = C(t, u, r, c); if (!l)
|
1634
|
+
return !1; c += l.length, t.write(i.from([n.codes.auth << 4])), _(t, c), t.write(i.from([a])), null !== l && l.write(); return !0; }(e, t, r);
|
1635
|
+
default: return t.emit("error", new Error("Unknown command")), !1;
|
1636
|
+
} }
|
1637
|
+
function y(e) { e.uncork(); }
|
1638
|
+
Object.defineProperty(b, "cacheNumbers", { get: function () { return d === S; }, set: function (e) { e ? (c && 0 !== Object.keys(c).length || (g = !0), d = S) : (g = !1, d = x); } });
|
1639
|
+
var m = {};
|
1640
|
+
function _(e, t) { var r = m[t]; r || (r = p(t).data, t < 16384 && (m[t] = r)), e.write(r); }
|
1641
|
+
function v(e, t) { var r = i.byteLength(t); d(e, r), e.write(t, "utf8"); }
|
1642
|
+
function w(e, t, r) { v(e, t), v(e, r); }
|
1643
|
+
function S(e, t) { return e.write(c[t]); }
|
1644
|
+
function x(e, t) { return e.write(l(t)); }
|
1645
|
+
function k(e, t) { return e.write(h(t)); }
|
1646
|
+
function E(e, t) { "string" == typeof t ? v(e, t) : t ? (d(e, t.length), e.write(t)) : d(e, 0); }
|
1647
|
+
function I(e, t) { if ("object" != typeof t || null != t.length)
|
1648
|
+
return { length: 1, write: function () { O(e, {}, 0); } }; var r = 0; function o(r) { var o = n.propertiesTypes[r], s = t[r], a = 0; switch (o) {
|
1649
|
+
case "byte":
|
1650
|
+
if ("boolean" != typeof s)
|
1651
|
+
return e.emit("error", new Error("Invalid " + r)), !1;
|
1652
|
+
a += 2;
|
1653
|
+
break;
|
1654
|
+
case "int8":
|
1655
|
+
if ("number" != typeof s)
|
1656
|
+
return e.emit("error", new Error("Invalid " + r)), !1;
|
1657
|
+
a += 2;
|
1658
|
+
break;
|
1659
|
+
case "binary":
|
1660
|
+
if (s && null === s)
|
1661
|
+
return e.emit("error", new Error("Invalid " + r)), !1;
|
1662
|
+
a += 1 + i.byteLength(s) + 2;
|
1663
|
+
break;
|
1664
|
+
case "int16":
|
1665
|
+
if ("number" != typeof s)
|
1666
|
+
return e.emit("error", new Error("Invalid " + r)), !1;
|
1667
|
+
a += 3;
|
1668
|
+
break;
|
1669
|
+
case "int32":
|
1670
|
+
if ("number" != typeof s)
|
1671
|
+
return e.emit("error", new Error("Invalid " + r)), !1;
|
1672
|
+
a += 5;
|
1673
|
+
break;
|
1674
|
+
case "var":
|
1675
|
+
if ("number" != typeof s)
|
1676
|
+
return e.emit("error", new Error("Invalid " + r)), !1;
|
1677
|
+
a += 1 + p(s).length;
|
1678
|
+
break;
|
1679
|
+
case "string":
|
1680
|
+
if ("string" != typeof s)
|
1681
|
+
return e.emit("error", new Error("Invalid " + r)), !1;
|
1682
|
+
a += 3 + i.byteLength(s.toString());
|
1683
|
+
break;
|
1684
|
+
case "pair":
|
1685
|
+
if ("object" != typeof s)
|
1686
|
+
return e.emit("error", new Error("Invalid " + r)), !1;
|
1687
|
+
a += Object.getOwnPropertyNames(s).reduce(function (e, t) { return e += 3 + i.byteLength(t.toString()) + 2 + i.byteLength(s[t].toString()); }, 0);
|
1688
|
+
break;
|
1689
|
+
default: return e.emit("error", new Error("Invalid property " + r)), !1;
|
1690
|
+
} return a; } if (t)
|
1691
|
+
for (var s in t) {
|
1692
|
+
var a = o(s);
|
1693
|
+
if (!a)
|
1694
|
+
return !1;
|
1695
|
+
r += a;
|
1696
|
+
} return { length: p(r).length + r, write: function () { O(e, t, r); } }; }
|
1697
|
+
function C(e, t, r, n) { var i = ["reasonString", "userProperties"], o = r && r.properties && r.properties.maximumPacketSize ? r.properties.maximumPacketSize : 0, s = I(e, t); if (o)
|
1698
|
+
for (; n + s.length > o;) {
|
1699
|
+
var a = i.shift();
|
1700
|
+
if (!a || !t[a])
|
1701
|
+
return !1;
|
1702
|
+
delete t[a], s = I(e, t);
|
1703
|
+
} return s; }
|
1704
|
+
function O(e, t, r) { for (var o in _(e, r), t)
|
1705
|
+
if (t.hasOwnProperty(o) && null !== t[o]) {
|
1706
|
+
var s = t[o];
|
1707
|
+
switch (n.propertiesTypes[o]) {
|
1708
|
+
case "byte":
|
1709
|
+
e.write(i.from([n.properties[o]])), e.write(i.from([+s]));
|
1710
|
+
break;
|
1711
|
+
case "int8":
|
1712
|
+
e.write(i.from([n.properties[o]])), e.write(i.from([s]));
|
1713
|
+
break;
|
1714
|
+
case "binary":
|
1715
|
+
e.write(i.from([n.properties[o]])), E(e, s);
|
1716
|
+
break;
|
1717
|
+
case "int16":
|
1718
|
+
e.write(i.from([n.properties[o]])), d(e, s);
|
1719
|
+
break;
|
1720
|
+
case "int32":
|
1721
|
+
e.write(i.from([n.properties[o]])), k(e, s);
|
1722
|
+
break;
|
1723
|
+
case "var":
|
1724
|
+
e.write(i.from([n.properties[o]])), _(e, s);
|
1725
|
+
break;
|
1726
|
+
case "string":
|
1727
|
+
e.write(i.from([n.properties[o]])), v(e, s);
|
1728
|
+
break;
|
1729
|
+
case "pair":
|
1730
|
+
Object.getOwnPropertyNames(s).forEach(function (t) { e.write(i.from([n.properties[o]])), w(e, t.toString(), s[t].toString()); });
|
1731
|
+
break;
|
1732
|
+
default: return e.emit("error", new Error("Invalid property " + o)), !1;
|
1733
|
+
}
|
1734
|
+
} }
|
1735
|
+
function j(e) { return e ? e instanceof i ? e.length : i.byteLength(e) : 0; }
|
1736
|
+
function T(e) { return "string" == typeof e || e instanceof i; }
|
1737
|
+
t.exports = b;
|
1738
|
+
}, { "./constants": 90, "./numbers": 94, "process-nextick-args": 99, "safe-buffer": 118 }], 98: [function (e, t, r) { var n = e("wrappy"); function i(e) { var t = function () { return t.called ? t.value : (t.called = !0, t.value = e.apply(this, arguments)); }; return t.called = !1, t; } function o(e) { var t = function () { if (t.called)
|
1739
|
+
throw new Error(t.onceError); return t.called = !0, t.value = e.apply(this, arguments); }, r = e.name || "Function wrapped with `once`"; return t.onceError = r + " shouldn't be called more than once", t.called = !1, t; } t.exports = n(i), t.exports.strict = n(o), i.proto = i(function () { Object.defineProperty(Function.prototype, "once", { value: function () { return i(this); }, configurable: !0 }), Object.defineProperty(Function.prototype, "onceStrict", { value: function () { return o(this); }, configurable: !0 }); }); }, { wrappy: 139 }], 99: [function (e, t, r) { (function (e) {
|
1740
|
+
"use strict";
|
1741
|
+
void 0 === e || !e.version || 0 === e.version.indexOf("v0.") || 0 === e.version.indexOf("v1.") && 0 !== e.version.indexOf("v1.8.") ? t.exports = { nextTick: function (t, r, n, i) { if ("function" != typeof t)
|
1742
|
+
throw new TypeError('"callback" argument must be a function'); var o, s, a = arguments.length; switch (a) {
|
1743
|
+
case 0:
|
1744
|
+
case 1: return e.nextTick(t);
|
1745
|
+
case 2: return e.nextTick(function () { t.call(null, r); });
|
1746
|
+
case 3: return e.nextTick(function () { t.call(null, r, n); });
|
1747
|
+
case 4: return e.nextTick(function () { t.call(null, r, n, i); });
|
1748
|
+
default:
|
1749
|
+
for (o = new Array(a - 1), s = 0; s < o.length;)
|
1750
|
+
o[s++] = arguments[s];
|
1751
|
+
return e.nextTick(function () { t.apply(null, o); });
|
1752
|
+
} } } : t.exports = e;
|
1753
|
+
}).call(this, e("_process")); }, { _process: 100 }], 100: [function (e, t, r) { var n, i, o = t.exports = {}; function s() { throw new Error("setTimeout has not been defined"); } function a() { throw new Error("clearTimeout has not been defined"); } function u(e) { if (n === setTimeout)
|
1754
|
+
return setTimeout(e, 0); if ((n === s || !n) && setTimeout)
|
1755
|
+
return n = setTimeout, setTimeout(e, 0); try {
|
1756
|
+
return n(e, 0);
|
1757
|
+
}
|
1758
|
+
catch (t) {
|
1759
|
+
try {
|
1760
|
+
return n.call(null, e, 0);
|
1761
|
+
}
|
1762
|
+
catch (t) {
|
1763
|
+
return n.call(this, e, 0);
|
1764
|
+
}
|
1765
|
+
} } !function () { try {
|
1766
|
+
n = "function" == typeof setTimeout ? setTimeout : s;
|
1767
|
+
}
|
1768
|
+
catch (e) {
|
1769
|
+
n = s;
|
1770
|
+
} try {
|
1771
|
+
i = "function" == typeof clearTimeout ? clearTimeout : a;
|
1772
|
+
}
|
1773
|
+
catch (e) {
|
1774
|
+
i = a;
|
1775
|
+
} }(); var c, l = [], f = !1, p = -1; function h() { f && c && (f = !1, c.length ? l = c.concat(l) : p = -1, l.length && d()); } function d() { if (!f) {
|
1776
|
+
var e = u(h);
|
1777
|
+
f = !0;
|
1778
|
+
for (var t = l.length; t;) {
|
1779
|
+
for (c = l, l = []; ++p < t;)
|
1780
|
+
c && c[p].run();
|
1781
|
+
p = -1, t = l.length;
|
1782
|
+
}
|
1783
|
+
c = null, f = !1, function (e) { if (i === clearTimeout)
|
1784
|
+
return clearTimeout(e); if ((i === a || !i) && clearTimeout)
|
1785
|
+
return i = clearTimeout, clearTimeout(e); try {
|
1786
|
+
i(e);
|
1787
|
+
}
|
1788
|
+
catch (t) {
|
1789
|
+
try {
|
1790
|
+
return i.call(null, e);
|
1791
|
+
}
|
1792
|
+
catch (t) {
|
1793
|
+
return i.call(this, e);
|
1794
|
+
}
|
1795
|
+
} }(e);
|
1796
|
+
} } function g(e, t) { this.fun = e, this.array = t; } function b() { } o.nextTick = function (e) { var t = new Array(arguments.length - 1); if (arguments.length > 1)
|
1797
|
+
for (var r = 1; r < arguments.length; r++)
|
1798
|
+
t[r - 1] = arguments[r]; l.push(new g(e, t)), 1 !== l.length || f || u(d); }, g.prototype.run = function () { this.fun.apply(null, this.array); }, o.title = "browser", o.browser = !0, o.env = {}, o.argv = [], o.version = "", o.versions = {}, o.on = b, o.addListener = b, o.once = b, o.off = b, o.removeListener = b, o.removeAllListeners = b, o.emit = b, o.prependListener = b, o.prependOnceListener = b, o.listeners = function (e) { return []; }, o.binding = function (e) { throw new Error("process.binding is not supported"); }, o.cwd = function () { return "/"; }, o.chdir = function (e) { throw new Error("process.chdir is not supported"); }, o.umask = function () { return 0; }; }, {}], 101: [function (e, t, r) { (function (e) { !function (n) { var i = "object" == typeof r && r && !r.nodeType && r, o = "object" == typeof t && t && !t.nodeType && t, s = "object" == typeof e && e; s.global !== s && s.window !== s && s.self !== s || (n = s); var a, u, c = 2147483647, l = 36, f = 1, p = 26, h = 38, d = 700, g = 72, b = 128, y = "-", m = /^xn--/, _ = /[^\x20-\x7E]/, v = /[\x2E\u3002\uFF0E\uFF61]/g, w = { overflow: "Overflow: input needs wider integers to process", "not-basic": "Illegal input >= 0x80 (not a basic code point)", "invalid-input": "Invalid input" }, S = l - f, x = Math.floor, k = String.fromCharCode; function E(e) { throw new RangeError(w[e]); } function I(e, t) { for (var r = e.length, n = []; r--;)
|
1799
|
+
n[r] = t(e[r]); return n; } function C(e, t) { var r = e.split("@"), n = ""; return r.length > 1 && (n = r[0] + "@", e = r[1]), n + I((e = e.replace(v, ".")).split("."), t).join("."); } function O(e) { for (var t, r, n = [], i = 0, o = e.length; i < o;)
|
1800
|
+
(t = e.charCodeAt(i++)) >= 55296 && t <= 56319 && i < o ? 56320 == (64512 & (r = e.charCodeAt(i++))) ? n.push(((1023 & t) << 10) + (1023 & r) + 65536) : (n.push(t), i--) : n.push(t); return n; } function j(e) { return I(e, function (e) { var t = ""; return e > 65535 && (t += k((e -= 65536) >>> 10 & 1023 | 55296), e = 56320 | 1023 & e), t += k(e); }).join(""); } function T(e, t) { return e + 22 + 75 * (e < 26) - ((0 != t) << 5); } function A(e, t, r) { var n = 0; for (e = r ? x(e / d) : e >> 1, e += x(e / t); e > S * p >> 1; n += l)
|
1801
|
+
e = x(e / S); return x(n + (S + 1) * e / (e + h)); } function P(e) { var t, r, n, i, o, s, a, u, h, d, m, _ = [], v = e.length, w = 0, S = b, k = g; for ((r = e.lastIndexOf(y)) < 0 && (r = 0), n = 0; n < r; ++n)
|
1802
|
+
e.charCodeAt(n) >= 128 && E("not-basic"), _.push(e.charCodeAt(n)); for (i = r > 0 ? r + 1 : 0; i < v;) {
|
1803
|
+
for (o = w, s = 1, a = l; i >= v && E("invalid-input"), ((u = (m = e.charCodeAt(i++)) - 48 < 10 ? m - 22 : m - 65 < 26 ? m - 65 : m - 97 < 26 ? m - 97 : l) >= l || u > x((c - w) / s)) && E("overflow"), w += u * s, !(u < (h = a <= k ? f : a >= k + p ? p : a - k)); a += l)
|
1804
|
+
s > x(c / (d = l - h)) && E("overflow"), s *= d;
|
1805
|
+
k = A(w - o, t = _.length + 1, 0 == o), x(w / t) > c - S && E("overflow"), S += x(w / t), w %= t, _.splice(w++, 0, S);
|
1806
|
+
} return j(_); } function M(e) { var t, r, n, i, o, s, a, u, h, d, m, _, v, w, S, I = []; for (_ = (e = O(e)).length, t = b, r = 0, o = g, s = 0; s < _; ++s)
|
1807
|
+
(m = e[s]) < 128 && I.push(k(m)); for (n = i = I.length, i && I.push(y); n < _;) {
|
1808
|
+
for (a = c, s = 0; s < _; ++s)
|
1809
|
+
(m = e[s]) >= t && m < a && (a = m);
|
1810
|
+
for (a - t > x((c - r) / (v = n + 1)) && E("overflow"), r += (a - t) * v, t = a, s = 0; s < _; ++s)
|
1811
|
+
if ((m = e[s]) < t && ++r > c && E("overflow"), m == t) {
|
1812
|
+
for (u = r, h = l; !(u < (d = h <= o ? f : h >= o + p ? p : h - o)); h += l)
|
1813
|
+
S = u - d, w = l - d, I.push(k(T(d + S % w, 0))), u = x(S / w);
|
1814
|
+
I.push(k(T(u, 0))), o = A(r, v, n == i), r = 0, ++n;
|
1815
|
+
}
|
1816
|
+
++r, ++t;
|
1817
|
+
} return I.join(""); } if (a = { version: "1.4.1", ucs2: { decode: O, encode: j }, decode: P, encode: M, toASCII: function (e) { return C(e, function (e) { return _.test(e) ? "xn--" + M(e) : e; }); }, toUnicode: function (e) { return C(e, function (e) { return m.test(e) ? P(e.slice(4).toLowerCase()) : e; }); } }, i && o)
|
1818
|
+
if (t.exports == i)
|
1819
|
+
o.exports = a;
|
1820
|
+
else
|
1821
|
+
for (u in a)
|
1822
|
+
a.hasOwnProperty(u) && (i[u] = a[u]);
|
1823
|
+
else
|
1824
|
+
n.punycode = a; }(this); }).call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {}); }, {}], 102: [function (e, t, r) {
|
1825
|
+
"use strict";
|
1826
|
+
function n(e, t) { return Object.prototype.hasOwnProperty.call(e, t); }
|
1827
|
+
t.exports = function (e, t, r, o) { t = t || "&", r = r || "="; var s = {}; if ("string" != typeof e || 0 === e.length)
|
1828
|
+
return s; var a = /\+/g; e = e.split(t); var u = 1e3; o && "number" == typeof o.maxKeys && (u = o.maxKeys); var c = e.length; u > 0 && c > u && (c = u); for (var l = 0; l < c; ++l) {
|
1829
|
+
var f, p, h, d, g = e[l].replace(a, "%20"), b = g.indexOf(r);
|
1830
|
+
b >= 0 ? (f = g.substr(0, b), p = g.substr(b + 1)) : (f = g, p = ""), h = decodeURIComponent(f), d = decodeURIComponent(p), n(s, h) ? i(s[h]) ? s[h].push(d) : s[h] = [s[h], d] : s[h] = d;
|
1831
|
+
} return s; };
|
1832
|
+
var i = Array.isArray || function (e) { return "[object Array]" === Object.prototype.toString.call(e); };
|
1833
|
+
}, {}], 103: [function (e, t, r) {
|
1834
|
+
"use strict";
|
1835
|
+
var n = function (e) { switch (typeof e) {
|
1836
|
+
case "string": return e;
|
1837
|
+
case "boolean": return e ? "true" : "false";
|
1838
|
+
case "number": return isFinite(e) ? e : "";
|
1839
|
+
default: return "";
|
1840
|
+
} };
|
1841
|
+
t.exports = function (e, t, r, a) { return t = t || "&", r = r || "=", null === e && (e = void 0), "object" == typeof e ? o(s(e), function (s) { var a = encodeURIComponent(n(s)) + r; return i(e[s]) ? o(e[s], function (e) { return a + encodeURIComponent(n(e)); }).join(t) : a + encodeURIComponent(n(e[s])); }).join(t) : a ? encodeURIComponent(n(a)) + r + encodeURIComponent(n(e)) : ""; };
|
1842
|
+
var i = Array.isArray || function (e) { return "[object Array]" === Object.prototype.toString.call(e); };
|
1843
|
+
function o(e, t) { if (e.map)
|
1844
|
+
return e.map(t); for (var r = [], n = 0; n < e.length; n++)
|
1845
|
+
r.push(t(e[n], n)); return r; }
|
1846
|
+
var s = Object.keys || function (e) { var t = []; for (var r in e)
|
1847
|
+
Object.prototype.hasOwnProperty.call(e, r) && t.push(r); return t; };
|
1848
|
+
}, {}], 104: [function (e, t, r) {
|
1849
|
+
"use strict";
|
1850
|
+
r.decode = r.parse = e("./decode"), r.encode = r.stringify = e("./encode");
|
1851
|
+
}, { "./decode": 102, "./encode": 103 }], 105: [function (e, t, r) { t.exports = e("./lib/_stream_duplex.js"); }, { "./lib/_stream_duplex.js": 106 }], 106: [function (e, t, r) {
|
1852
|
+
"use strict";
|
1853
|
+
var n = e("process-nextick-args"), i = Object.keys || function (e) { var t = []; for (var r in e)
|
1854
|
+
t.push(r); return t; };
|
1855
|
+
t.exports = f;
|
1856
|
+
var o = e("core-util-is");
|
1857
|
+
o.inherits = e("inherits");
|
1858
|
+
var s = e("./_stream_readable"), a = e("./_stream_writable");
|
1859
|
+
o.inherits(f, s);
|
1860
|
+
for (var u = i(a.prototype), c = 0; c < u.length; c++) {
|
1861
|
+
var l = u[c];
|
1862
|
+
f.prototype[l] || (f.prototype[l] = a.prototype[l]);
|
1863
|
+
}
|
1864
|
+
function f(e) { if (!(this instanceof f))
|
1865
|
+
return new f(e); s.call(this, e), a.call(this, e), e && !1 === e.readable && (this.readable = !1), e && !1 === e.writable && (this.writable = !1), this.allowHalfOpen = !0, e && !1 === e.allowHalfOpen && (this.allowHalfOpen = !1), this.once("end", p); }
|
1866
|
+
function p() { this.allowHalfOpen || this._writableState.ended || n.nextTick(h, this); }
|
1867
|
+
function h(e) { e.end(); }
|
1868
|
+
Object.defineProperty(f.prototype, "writableHighWaterMark", { enumerable: !1, get: function () { return this._writableState.highWaterMark; } }), Object.defineProperty(f.prototype, "destroyed", { get: function () { return void 0 !== this._readableState && void 0 !== this._writableState && (this._readableState.destroyed && this._writableState.destroyed); }, set: function (e) { void 0 !== this._readableState && void 0 !== this._writableState && (this._readableState.destroyed = e, this._writableState.destroyed = e); } }), f.prototype._destroy = function (e, t) { this.push(null), this.end(), n.nextTick(t, e); };
|
1869
|
+
}, { "./_stream_readable": 108, "./_stream_writable": 110, "core-util-is": 13, inherits: 88, "process-nextick-args": 99 }], 107: [function (e, t, r) {
|
1870
|
+
"use strict";
|
1871
|
+
t.exports = o;
|
1872
|
+
var n = e("./_stream_transform"), i = e("core-util-is");
|
1873
|
+
function o(e) { if (!(this instanceof o))
|
1874
|
+
return new o(e); n.call(this, e); }
|
1875
|
+
i.inherits = e("inherits"), i.inherits(o, n), o.prototype._transform = function (e, t, r) { r(null, e); };
|
1876
|
+
}, { "./_stream_transform": 109, "core-util-is": 13, inherits: 88 }], 108: [function (e, t, r) { (function (r, n) {
|
1877
|
+
"use strict";
|
1878
|
+
var i = e("process-nextick-args");
|
1879
|
+
t.exports = _;
|
1880
|
+
var o, s = e("isarray");
|
1881
|
+
_.ReadableState = m;
|
1882
|
+
e("events").EventEmitter;
|
1883
|
+
var a = function (e, t) { return e.listeners(t).length; }, u = e("./internal/streams/stream"), c = e("safe-buffer").Buffer, l = n.Uint8Array || function () { };
|
1884
|
+
var f = e("core-util-is");
|
1885
|
+
f.inherits = e("inherits");
|
1886
|
+
var p = e("util"), h = void 0;
|
1887
|
+
h = p && p.debuglog ? p.debuglog("stream") : function () { };
|
1888
|
+
var d, g = e("./internal/streams/BufferList"), b = e("./internal/streams/destroy");
|
1889
|
+
f.inherits(_, u);
|
1890
|
+
var y = ["error", "close", "destroy", "pause", "resume"];
|
1891
|
+
function m(t, r) { o = o || e("./_stream_duplex"), t = t || {}; var n = r instanceof o; this.objectMode = !!t.objectMode, n && (this.objectMode = this.objectMode || !!t.readableObjectMode); var i = t.highWaterMark, s = t.readableHighWaterMark, a = this.objectMode ? 16 : 16384; this.highWaterMark = i || 0 === i ? i : n && (s || 0 === s) ? s : a, this.highWaterMark = Math.floor(this.highWaterMark), this.buffer = new g, this.length = 0, this.pipes = null, this.pipesCount = 0, this.flowing = null, this.ended = !1, this.endEmitted = !1, this.reading = !1, this.sync = !0, this.needReadable = !1, this.emittedReadable = !1, this.readableListening = !1, this.resumeScheduled = !1, this.destroyed = !1, this.defaultEncoding = t.defaultEncoding || "utf8", this.awaitDrain = 0, this.readingMore = !1, this.decoder = null, this.encoding = null, t.encoding && (d || (d = e("string_decoder/").StringDecoder), this.decoder = new d(t.encoding), this.encoding = t.encoding); }
|
1892
|
+
function _(t) { if (o = o || e("./_stream_duplex"), !(this instanceof _))
|
1893
|
+
return new _(t); this._readableState = new m(t, this), this.readable = !0, t && ("function" == typeof t.read && (this._read = t.read), "function" == typeof t.destroy && (this._destroy = t.destroy)), u.call(this); }
|
1894
|
+
function v(e, t, r, n, i) { var o, s = e._readableState; null === t ? (s.reading = !1, function (e, t) { if (t.ended)
|
1895
|
+
return; if (t.decoder) {
|
1896
|
+
var r = t.decoder.end();
|
1897
|
+
r && r.length && (t.buffer.push(r), t.length += t.objectMode ? 1 : r.length);
|
1898
|
+
} t.ended = !0, k(e); }(e, s)) : (i || (o = function (e, t) { var r; n = t, c.isBuffer(n) || n instanceof l || "string" == typeof t || void 0 === t || e.objectMode || (r = new TypeError("Invalid non-string/buffer chunk")); var n; return r; }(s, t)), o ? e.emit("error", o) : s.objectMode || t && t.length > 0 ? ("string" == typeof t || s.objectMode || Object.getPrototypeOf(t) === c.prototype || (t = function (e) { return c.from(e); }(t)), n ? s.endEmitted ? e.emit("error", new Error("stream.unshift() after end event")) : w(e, s, t, !0) : s.ended ? e.emit("error", new Error("stream.push() after EOF")) : (s.reading = !1, s.decoder && !r ? (t = s.decoder.write(t), s.objectMode || 0 !== t.length ? w(e, s, t, !1) : I(e, s)) : w(e, s, t, !1))) : n || (s.reading = !1)); return function (e) { return !e.ended && (e.needReadable || e.length < e.highWaterMark || 0 === e.length); }(s); }
|
1899
|
+
function w(e, t, r, n) { t.flowing && 0 === t.length && !t.sync ? (e.emit("data", r), e.read(0)) : (t.length += t.objectMode ? 1 : r.length, n ? t.buffer.unshift(r) : t.buffer.push(r), t.needReadable && k(e)), I(e, t); }
|
1900
|
+
Object.defineProperty(_.prototype, "destroyed", { get: function () { return void 0 !== this._readableState && this._readableState.destroyed; }, set: function (e) { this._readableState && (this._readableState.destroyed = e); } }), _.prototype.destroy = b.destroy, _.prototype._undestroy = b.undestroy, _.prototype._destroy = function (e, t) { this.push(null), t(e); }, _.prototype.push = function (e, t) { var r, n = this._readableState; return n.objectMode ? r = !0 : "string" == typeof e && ((t = t || n.defaultEncoding) !== n.encoding && (e = c.from(e, t), t = ""), r = !0), v(this, e, t, !1, r); }, _.prototype.unshift = function (e) { return v(this, e, null, !0, !1); }, _.prototype.isPaused = function () { return !1 === this._readableState.flowing; }, _.prototype.setEncoding = function (t) { return d || (d = e("string_decoder/").StringDecoder), this._readableState.decoder = new d(t), this._readableState.encoding = t, this; };
|
1901
|
+
var S = 8388608;
|
1902
|
+
function x(e, t) { return e <= 0 || 0 === t.length && t.ended ? 0 : t.objectMode ? 1 : e != e ? t.flowing && t.length ? t.buffer.head.data.length : t.length : (e > t.highWaterMark && (t.highWaterMark = function (e) { return e >= S ? e = S : (e--, e |= e >>> 1, e |= e >>> 2, e |= e >>> 4, e |= e >>> 8, e |= e >>> 16, e++), e; }(e)), e <= t.length ? e : t.ended ? t.length : (t.needReadable = !0, 0)); }
|
1903
|
+
function k(e) { var t = e._readableState; t.needReadable = !1, t.emittedReadable || (h("emitReadable", t.flowing), t.emittedReadable = !0, t.sync ? i.nextTick(E, e) : E(e)); }
|
1904
|
+
function E(e) { h("emit readable"), e.emit("readable"), T(e); }
|
1905
|
+
function I(e, t) { t.readingMore || (t.readingMore = !0, i.nextTick(C, e, t)); }
|
1906
|
+
function C(e, t) { for (var r = t.length; !t.reading && !t.flowing && !t.ended && t.length < t.highWaterMark && (h("maybeReadMore read 0"), e.read(0), r !== t.length);)
|
1907
|
+
r = t.length; t.readingMore = !1; }
|
1908
|
+
function O(e) { h("readable nexttick read 0"), e.read(0); }
|
1909
|
+
function j(e, t) { t.reading || (h("resume read 0"), e.read(0)), t.resumeScheduled = !1, t.awaitDrain = 0, e.emit("resume"), T(e), t.flowing && !t.reading && e.read(0); }
|
1910
|
+
function T(e) { var t = e._readableState; for (h("flow", t.flowing); t.flowing && null !== e.read();)
|
1911
|
+
; }
|
1912
|
+
function A(e, t) { return 0 === t.length ? null : (t.objectMode ? r = t.buffer.shift() : !e || e >= t.length ? (r = t.decoder ? t.buffer.join("") : 1 === t.buffer.length ? t.buffer.head.data : t.buffer.concat(t.length), t.buffer.clear()) : r = function (e, t, r) { var n; e < t.head.data.length ? (n = t.head.data.slice(0, e), t.head.data = t.head.data.slice(e)) : n = e === t.head.data.length ? t.shift() : r ? function (e, t) { var r = t.head, n = 1, i = r.data; e -= i.length; for (; r = r.next;) {
|
1913
|
+
var o = r.data, s = e > o.length ? o.length : e;
|
1914
|
+
if (s === o.length ? i += o : i += o.slice(0, e), 0 === (e -= s)) {
|
1915
|
+
s === o.length ? (++n, r.next ? t.head = r.next : t.head = t.tail = null) : (t.head = r, r.data = o.slice(s));
|
1916
|
+
break;
|
1917
|
+
}
|
1918
|
+
++n;
|
1919
|
+
} return t.length -= n, i; }(e, t) : function (e, t) { var r = c.allocUnsafe(e), n = t.head, i = 1; n.data.copy(r), e -= n.data.length; for (; n = n.next;) {
|
1920
|
+
var o = n.data, s = e > o.length ? o.length : e;
|
1921
|
+
if (o.copy(r, r.length - e, 0, s), 0 === (e -= s)) {
|
1922
|
+
s === o.length ? (++i, n.next ? t.head = n.next : t.head = t.tail = null) : (t.head = n, n.data = o.slice(s));
|
1923
|
+
break;
|
1924
|
+
}
|
1925
|
+
++i;
|
1926
|
+
} return t.length -= i, r; }(e, t); return n; }(e, t.buffer, t.decoder), r); var r; }
|
1927
|
+
function P(e) { var t = e._readableState; if (t.length > 0)
|
1928
|
+
throw new Error('"endReadable()" called on non-empty stream'); t.endEmitted || (t.ended = !0, i.nextTick(M, t, e)); }
|
1929
|
+
function M(e, t) { e.endEmitted || 0 !== e.length || (e.endEmitted = !0, t.readable = !1, t.emit("end")); }
|
1930
|
+
function B(e, t) { for (var r = 0, n = e.length; r < n; r++)
|
1931
|
+
if (e[r] === t)
|
1932
|
+
return r; return -1; }
|
1933
|
+
_.prototype.read = function (e) { h("read", e), e = parseInt(e, 10); var t = this._readableState, r = e; if (0 !== e && (t.emittedReadable = !1), 0 === e && t.needReadable && (t.length >= t.highWaterMark || t.ended))
|
1934
|
+
return h("read: emitReadable", t.length, t.ended), 0 === t.length && t.ended ? P(this) : k(this), null; if (0 === (e = x(e, t)) && t.ended)
|
1935
|
+
return 0 === t.length && P(this), null; var n, i = t.needReadable; return h("need readable", i), (0 === t.length || t.length - e < t.highWaterMark) && h("length less than watermark", i = !0), t.ended || t.reading ? h("reading or ended", i = !1) : i && (h("do read"), t.reading = !0, t.sync = !0, 0 === t.length && (t.needReadable = !0), this._read(t.highWaterMark), t.sync = !1, t.reading || (e = x(r, t))), null === (n = e > 0 ? A(e, t) : null) ? (t.needReadable = !0, e = 0) : t.length -= e, 0 === t.length && (t.ended || (t.needReadable = !0), r !== e && t.ended && P(this)), null !== n && this.emit("data", n), n; }, _.prototype._read = function (e) { this.emit("error", new Error("_read() is not implemented")); }, _.prototype.pipe = function (e, t) { var n = this, o = this._readableState; switch (o.pipesCount) {
|
1936
|
+
case 0:
|
1937
|
+
o.pipes = e;
|
1938
|
+
break;
|
1939
|
+
case 1:
|
1940
|
+
o.pipes = [o.pipes, e];
|
1941
|
+
break;
|
1942
|
+
default: o.pipes.push(e);
|
1943
|
+
} o.pipesCount += 1, h("pipe count=%d opts=%j", o.pipesCount, t); var u = (!t || !1 !== t.end) && e !== r.stdout && e !== r.stderr ? l : _; function c(t, r) { h("onunpipe"), t === n && r && !1 === r.hasUnpiped && (r.hasUnpiped = !0, h("cleanup"), e.removeListener("close", y), e.removeListener("finish", m), e.removeListener("drain", f), e.removeListener("error", b), e.removeListener("unpipe", c), n.removeListener("end", l), n.removeListener("end", _), n.removeListener("data", g), p = !0, !o.awaitDrain || e._writableState && !e._writableState.needDrain || f()); } function l() { h("onend"), e.end(); } o.endEmitted ? i.nextTick(u) : n.once("end", u), e.on("unpipe", c); var f = function (e) { return function () { var t = e._readableState; h("pipeOnDrain", t.awaitDrain), t.awaitDrain && t.awaitDrain--, 0 === t.awaitDrain && a(e, "data") && (t.flowing = !0, T(e)); }; }(n); e.on("drain", f); var p = !1; var d = !1; function g(t) { h("ondata"), d = !1, !1 !== e.write(t) || d || ((1 === o.pipesCount && o.pipes === e || o.pipesCount > 1 && -1 !== B(o.pipes, e)) && !p && (h("false write response, pause", n._readableState.awaitDrain), n._readableState.awaitDrain++, d = !0), n.pause()); } function b(t) { h("onerror", t), _(), e.removeListener("error", b), 0 === a(e, "error") && e.emit("error", t); } function y() { e.removeListener("finish", m), _(); } function m() { h("onfinish"), e.removeListener("close", y), _(); } function _() { h("unpipe"), n.unpipe(e); } return n.on("data", g), function (e, t, r) { if ("function" == typeof e.prependListener)
|
1944
|
+
return e.prependListener(t, r); e._events && e._events[t] ? s(e._events[t]) ? e._events[t].unshift(r) : e._events[t] = [r, e._events[t]] : e.on(t, r); }(e, "error", b), e.once("close", y), e.once("finish", m), e.emit("pipe", n), o.flowing || (h("pipe resume"), n.resume()), e; }, _.prototype.unpipe = function (e) { var t = this._readableState, r = { hasUnpiped: !1 }; if (0 === t.pipesCount)
|
1945
|
+
return this; if (1 === t.pipesCount)
|
1946
|
+
return e && e !== t.pipes ? this : (e || (e = t.pipes), t.pipes = null, t.pipesCount = 0, t.flowing = !1, e && e.emit("unpipe", this, r), this); if (!e) {
|
1947
|
+
var n = t.pipes, i = t.pipesCount;
|
1948
|
+
t.pipes = null, t.pipesCount = 0, t.flowing = !1;
|
1949
|
+
for (var o = 0; o < i; o++)
|
1950
|
+
n[o].emit("unpipe", this, r);
|
1951
|
+
return this;
|
1952
|
+
} var s = B(t.pipes, e); return -1 === s ? this : (t.pipes.splice(s, 1), t.pipesCount -= 1, 1 === t.pipesCount && (t.pipes = t.pipes[0]), e.emit("unpipe", this, r), this); }, _.prototype.on = function (e, t) { var r = u.prototype.on.call(this, e, t); if ("data" === e)
|
1953
|
+
!1 !== this._readableState.flowing && this.resume();
|
1954
|
+
else if ("readable" === e) {
|
1955
|
+
var n = this._readableState;
|
1956
|
+
n.endEmitted || n.readableListening || (n.readableListening = n.needReadable = !0, n.emittedReadable = !1, n.reading ? n.length && k(this) : i.nextTick(O, this));
|
1957
|
+
} return r; }, _.prototype.addListener = _.prototype.on, _.prototype.resume = function () { var e = this._readableState; return e.flowing || (h("resume"), e.flowing = !0, function (e, t) { t.resumeScheduled || (t.resumeScheduled = !0, i.nextTick(j, e, t)); }(this, e)), this; }, _.prototype.pause = function () { return h("call pause flowing=%j", this._readableState.flowing), !1 !== this._readableState.flowing && (h("pause"), this._readableState.flowing = !1, this.emit("pause")), this; }, _.prototype.wrap = function (e) { var t = this, r = this._readableState, n = !1; for (var i in e.on("end", function () { if (h("wrapped end"), r.decoder && !r.ended) {
|
1958
|
+
var e = r.decoder.end();
|
1959
|
+
e && e.length && t.push(e);
|
1960
|
+
} t.push(null); }), e.on("data", function (i) { (h("wrapped data"), r.decoder && (i = r.decoder.write(i)), !r.objectMode || null !== i && void 0 !== i) && ((r.objectMode || i && i.length) && (t.push(i) || (n = !0, e.pause()))); }), e)
|
1961
|
+
void 0 === this[i] && "function" == typeof e[i] && (this[i] = function (t) { return function () { return e[t].apply(e, arguments); }; }(i)); for (var o = 0; o < y.length; o++)
|
1962
|
+
e.on(y[o], this.emit.bind(this, y[o])); return this._read = function (t) { h("wrapped _read", t), n && (n = !1, e.resume()); }, this; }, Object.defineProperty(_.prototype, "readableHighWaterMark", { enumerable: !1, get: function () { return this._readableState.highWaterMark; } }), _._fromList = A;
|
1963
|
+
}).call(this, e("_process"), "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {}); }, { "./_stream_duplex": 106, "./internal/streams/BufferList": 111, "./internal/streams/destroy": 112, "./internal/streams/stream": 113, _process: 100, "core-util-is": 13, events: 83, inherits: 88, isarray: 114, "process-nextick-args": 99, "safe-buffer": 118, "string_decoder/": 115, util: 11 }], 109: [function (e, t, r) {
|
1964
|
+
"use strict";
|
1965
|
+
t.exports = o;
|
1966
|
+
var n = e("./_stream_duplex"), i = e("core-util-is");
|
1967
|
+
function o(e) { if (!(this instanceof o))
|
1968
|
+
return new o(e); n.call(this, e), this._transformState = { afterTransform: function (e, t) { var r = this._transformState; r.transforming = !1; var n = r.writecb; if (!n)
|
1969
|
+
return this.emit("error", new Error("write callback called multiple times")); r.writechunk = null, r.writecb = null, null != t && this.push(t), n(e); var i = this._readableState; i.reading = !1, (i.needReadable || i.length < i.highWaterMark) && this._read(i.highWaterMark); }.bind(this), needTransform: !1, transforming: !1, writecb: null, writechunk: null, writeencoding: null }, this._readableState.needReadable = !0, this._readableState.sync = !1, e && ("function" == typeof e.transform && (this._transform = e.transform), "function" == typeof e.flush && (this._flush = e.flush)), this.on("prefinish", s); }
|
1970
|
+
function s() { var e = this; "function" == typeof this._flush ? this._flush(function (t, r) { a(e, t, r); }) : a(this, null, null); }
|
1971
|
+
function a(e, t, r) { if (t)
|
1972
|
+
return e.emit("error", t); if (null != r && e.push(r), e._writableState.length)
|
1973
|
+
throw new Error("Calling transform done when ws.length != 0"); if (e._transformState.transforming)
|
1974
|
+
throw new Error("Calling transform done when still transforming"); return e.push(null); }
|
1975
|
+
i.inherits = e("inherits"), i.inherits(o, n), o.prototype.push = function (e, t) { return this._transformState.needTransform = !1, n.prototype.push.call(this, e, t); }, o.prototype._transform = function (e, t, r) { throw new Error("_transform() is not implemented"); }, o.prototype._write = function (e, t, r) { var n = this._transformState; if (n.writecb = r, n.writechunk = e, n.writeencoding = t, !n.transforming) {
|
1976
|
+
var i = this._readableState;
|
1977
|
+
(n.needTransform || i.needReadable || i.length < i.highWaterMark) && this._read(i.highWaterMark);
|
1978
|
+
} }, o.prototype._read = function (e) { var t = this._transformState; null !== t.writechunk && t.writecb && !t.transforming ? (t.transforming = !0, this._transform(t.writechunk, t.writeencoding, t.afterTransform)) : t.needTransform = !0; }, o.prototype._destroy = function (e, t) { var r = this; n.prototype._destroy.call(this, e, function (e) { t(e), r.emit("close"); }); };
|
1979
|
+
}, { "./_stream_duplex": 106, "core-util-is": 13, inherits: 88 }], 110: [function (e, t, r) { (function (r, n, i) {
|
1980
|
+
"use strict";
|
1981
|
+
var o = e("process-nextick-args");
|
1982
|
+
function s(e) { var t = this; this.next = null, this.entry = null, this.finish = function () { !function (e, t, r) { var n = e.entry; e.entry = null; for (; n;) {
|
1983
|
+
var i = n.callback;
|
1984
|
+
t.pendingcb--, i(r), n = n.next;
|
1985
|
+
} t.corkedRequestsFree ? t.corkedRequestsFree.next = e : t.corkedRequestsFree = e; }(t, e); }; }
|
1986
|
+
t.exports = m;
|
1987
|
+
var a, u = !r.browser && ["v0.10", "v0.9."].indexOf(r.version.slice(0, 5)) > -1 ? i : o.nextTick;
|
1988
|
+
m.WritableState = y;
|
1989
|
+
var c = e("core-util-is");
|
1990
|
+
c.inherits = e("inherits");
|
1991
|
+
var l = { deprecate: e("util-deprecate") }, f = e("./internal/streams/stream"), p = e("safe-buffer").Buffer, h = n.Uint8Array || function () { };
|
1992
|
+
var d, g = e("./internal/streams/destroy");
|
1993
|
+
function b() { }
|
1994
|
+
function y(t, r) { a = a || e("./_stream_duplex"), t = t || {}; var n = r instanceof a; this.objectMode = !!t.objectMode, n && (this.objectMode = this.objectMode || !!t.writableObjectMode); var i = t.highWaterMark, c = t.writableHighWaterMark, l = this.objectMode ? 16 : 16384; this.highWaterMark = i || 0 === i ? i : n && (c || 0 === c) ? c : l, this.highWaterMark = Math.floor(this.highWaterMark), this.finalCalled = !1, this.needDrain = !1, this.ending = !1, this.ended = !1, this.finished = !1, this.destroyed = !1; var f = !1 === t.decodeStrings; this.decodeStrings = !f, this.defaultEncoding = t.defaultEncoding || "utf8", this.length = 0, this.writing = !1, this.corked = 0, this.sync = !0, this.bufferProcessing = !1, this.onwrite = function (e) { !function (e, t) { var r = e._writableState, n = r.sync, i = r.writecb; if (function (e) { e.writing = !1, e.writecb = null, e.length -= e.writelen, e.writelen = 0; }(r), t)
|
1995
|
+
!function (e, t, r, n, i) { --t.pendingcb, r ? (o.nextTick(i, n), o.nextTick(k, e, t), e._writableState.errorEmitted = !0, e.emit("error", n)) : (i(n), e._writableState.errorEmitted = !0, e.emit("error", n), k(e, t)); }(e, r, n, t, i);
|
1996
|
+
else {
|
1997
|
+
var s = S(r);
|
1998
|
+
s || r.corked || r.bufferProcessing || !r.bufferedRequest || w(e, r), n ? u(v, e, r, s, i) : v(e, r, s, i);
|
1999
|
+
} }(r, e); }, this.writecb = null, this.writelen = 0, this.bufferedRequest = null, this.lastBufferedRequest = null, this.pendingcb = 0, this.prefinished = !1, this.errorEmitted = !1, this.bufferedRequestCount = 0, this.corkedRequestsFree = new s(this); }
|
2000
|
+
function m(t) { if (a = a || e("./_stream_duplex"), !(d.call(m, this) || this instanceof a))
|
2001
|
+
return new m(t); this._writableState = new y(t, this), this.writable = !0, t && ("function" == typeof t.write && (this._write = t.write), "function" == typeof t.writev && (this._writev = t.writev), "function" == typeof t.destroy && (this._destroy = t.destroy), "function" == typeof t.final && (this._final = t.final)), f.call(this); }
|
2002
|
+
function _(e, t, r, n, i, o, s) { t.writelen = n, t.writecb = s, t.writing = !0, t.sync = !0, r ? e._writev(i, t.onwrite) : e._write(i, o, t.onwrite), t.sync = !1; }
|
2003
|
+
function v(e, t, r, n) { r || function (e, t) { 0 === t.length && t.needDrain && (t.needDrain = !1, e.emit("drain")); }(e, t), t.pendingcb--, n(), k(e, t); }
|
2004
|
+
function w(e, t) { t.bufferProcessing = !0; var r = t.bufferedRequest; if (e._writev && r && r.next) {
|
2005
|
+
var n = t.bufferedRequestCount, i = new Array(n), o = t.corkedRequestsFree;
|
2006
|
+
o.entry = r;
|
2007
|
+
for (var a = 0, u = !0; r;)
|
2008
|
+
i[a] = r, r.isBuf || (u = !1), r = r.next, a += 1;
|
2009
|
+
i.allBuffers = u, _(e, t, !0, t.length, i, "", o.finish), t.pendingcb++, t.lastBufferedRequest = null, o.next ? (t.corkedRequestsFree = o.next, o.next = null) : t.corkedRequestsFree = new s(t), t.bufferedRequestCount = 0;
|
2010
|
+
}
|
2011
|
+
else {
|
2012
|
+
for (; r;) {
|
2013
|
+
var c = r.chunk, l = r.encoding, f = r.callback;
|
2014
|
+
if (_(e, t, !1, t.objectMode ? 1 : c.length, c, l, f), r = r.next, t.bufferedRequestCount--, t.writing)
|
2015
|
+
break;
|
2016
|
+
}
|
2017
|
+
null === r && (t.lastBufferedRequest = null);
|
2018
|
+
} t.bufferedRequest = r, t.bufferProcessing = !1; }
|
2019
|
+
function S(e) { return e.ending && 0 === e.length && null === e.bufferedRequest && !e.finished && !e.writing; }
|
2020
|
+
function x(e, t) { e._final(function (r) { t.pendingcb--, r && e.emit("error", r), t.prefinished = !0, e.emit("prefinish"), k(e, t); }); }
|
2021
|
+
function k(e, t) { var r = S(t); return r && (!function (e, t) { t.prefinished || t.finalCalled || ("function" == typeof e._final ? (t.pendingcb++, t.finalCalled = !0, o.nextTick(x, e, t)) : (t.prefinished = !0, e.emit("prefinish"))); }(e, t), 0 === t.pendingcb && (t.finished = !0, e.emit("finish"))), r; }
|
2022
|
+
c.inherits(m, f), y.prototype.getBuffer = function () { for (var e = this.bufferedRequest, t = []; e;)
|
2023
|
+
t.push(e), e = e.next; return t; }, function () { try {
|
2024
|
+
Object.defineProperty(y.prototype, "buffer", { get: l.deprecate(function () { return this.getBuffer(); }, "_writableState.buffer is deprecated. Use _writableState.getBuffer instead.", "DEP0003") });
|
2025
|
+
}
|
2026
|
+
catch (e) { } }(), "function" == typeof Symbol && Symbol.hasInstance && "function" == typeof Function.prototype[Symbol.hasInstance] ? (d = Function.prototype[Symbol.hasInstance], Object.defineProperty(m, Symbol.hasInstance, { value: function (e) { return !!d.call(this, e) || this === m && (e && e._writableState instanceof y); } })) : d = function (e) { return e instanceof this; }, m.prototype.pipe = function () { this.emit("error", new Error("Cannot pipe, not readable")); }, m.prototype.write = function (e, t, r) { var n, i = this._writableState, s = !1, a = !i.objectMode && (n = e, p.isBuffer(n) || n instanceof h); return a && !p.isBuffer(e) && (e = function (e) { return p.from(e); }(e)), "function" == typeof t && (r = t, t = null), a ? t = "buffer" : t || (t = i.defaultEncoding), "function" != typeof r && (r = b), i.ended ? function (e, t) { var r = new Error("write after end"); e.emit("error", r), o.nextTick(t, r); }(this, r) : (a || function (e, t, r, n) { var i = !0, s = !1; return null === r ? s = new TypeError("May not write null values to stream") : "string" == typeof r || void 0 === r || t.objectMode || (s = new TypeError("Invalid non-string/buffer chunk")), s && (e.emit("error", s), o.nextTick(n, s), i = !1), i; }(this, i, e, r)) && (i.pendingcb++, s = function (e, t, r, n, i, o) { if (!r) {
|
2027
|
+
var s = function (e, t, r) { e.objectMode || !1 === e.decodeStrings || "string" != typeof t || (t = p.from(t, r)); return t; }(t, n, i);
|
2028
|
+
n !== s && (r = !0, i = "buffer", n = s);
|
2029
|
+
} var a = t.objectMode ? 1 : n.length; t.length += a; var u = t.length < t.highWaterMark; u || (t.needDrain = !0); if (t.writing || t.corked) {
|
2030
|
+
var c = t.lastBufferedRequest;
|
2031
|
+
t.lastBufferedRequest = { chunk: n, encoding: i, isBuf: r, callback: o, next: null }, c ? c.next = t.lastBufferedRequest : t.bufferedRequest = t.lastBufferedRequest, t.bufferedRequestCount += 1;
|
2032
|
+
}
|
2033
|
+
else
|
2034
|
+
_(e, t, !1, a, n, i, o); return u; }(this, i, a, e, t, r)), s; }, m.prototype.cork = function () { this._writableState.corked++; }, m.prototype.uncork = function () { var e = this._writableState; e.corked && (e.corked--, e.writing || e.corked || e.finished || e.bufferProcessing || !e.bufferedRequest || w(this, e)); }, m.prototype.setDefaultEncoding = function (e) { if ("string" == typeof e && (e = e.toLowerCase()), !(["hex", "utf8", "utf-8", "ascii", "binary", "base64", "ucs2", "ucs-2", "utf16le", "utf-16le", "raw"].indexOf((e + "").toLowerCase()) > -1))
|
2035
|
+
throw new TypeError("Unknown encoding: " + e); return this._writableState.defaultEncoding = e, this; }, Object.defineProperty(m.prototype, "writableHighWaterMark", { enumerable: !1, get: function () { return this._writableState.highWaterMark; } }), m.prototype._write = function (e, t, r) { r(new Error("_write() is not implemented")); }, m.prototype._writev = null, m.prototype.end = function (e, t, r) { var n = this._writableState; "function" == typeof e ? (r = e, e = null, t = null) : "function" == typeof t && (r = t, t = null), null !== e && void 0 !== e && this.write(e, t), n.corked && (n.corked = 1, this.uncork()), n.ending || n.finished || function (e, t, r) { t.ending = !0, k(e, t), r && (t.finished ? o.nextTick(r) : e.once("finish", r)); t.ended = !0, e.writable = !1; }(this, n, r); }, Object.defineProperty(m.prototype, "destroyed", { get: function () { return void 0 !== this._writableState && this._writableState.destroyed; }, set: function (e) { this._writableState && (this._writableState.destroyed = e); } }), m.prototype.destroy = g.destroy, m.prototype._undestroy = g.undestroy, m.prototype._destroy = function (e, t) { this.end(), t(e); };
|
2036
|
+
}).call(this, e("_process"), "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {}, e("timers").setImmediate); }, { "./_stream_duplex": 106, "./internal/streams/destroy": 112, "./internal/streams/stream": 113, _process: 100, "core-util-is": 13, inherits: 88, "process-nextick-args": 99, "safe-buffer": 118, timers: 120, "util-deprecate": 134 }], 111: [function (e, t, r) {
|
2037
|
+
"use strict";
|
2038
|
+
var n = e("safe-buffer").Buffer, i = e("util");
|
2039
|
+
t.exports = function () { function e() { !function (e, t) { if (!(e instanceof t))
|
2040
|
+
throw new TypeError("Cannot call a class as a function"); }(this, e), this.head = null, this.tail = null, this.length = 0; } return e.prototype.push = function (e) { var t = { data: e, next: null }; this.length > 0 ? this.tail.next = t : this.head = t, this.tail = t, ++this.length; }, e.prototype.unshift = function (e) { var t = { data: e, next: this.head }; 0 === this.length && (this.tail = t), this.head = t, ++this.length; }, e.prototype.shift = function () { if (0 !== this.length) {
|
2041
|
+
var e = this.head.data;
|
2042
|
+
return 1 === this.length ? this.head = this.tail = null : this.head = this.head.next, --this.length, e;
|
2043
|
+
} }, e.prototype.clear = function () { this.head = this.tail = null, this.length = 0; }, e.prototype.join = function (e) { if (0 === this.length)
|
2044
|
+
return ""; for (var t = this.head, r = "" + t.data; t = t.next;)
|
2045
|
+
r += e + t.data; return r; }, e.prototype.concat = function (e) { if (0 === this.length)
|
2046
|
+
return n.alloc(0); if (1 === this.length)
|
2047
|
+
return this.head.data; for (var t, r, i, o = n.allocUnsafe(e >>> 0), s = this.head, a = 0; s;)
|
2048
|
+
t = s.data, r = o, i = a, t.copy(r, i), a += s.data.length, s = s.next; return o; }, e; }(), i && i.inspect && i.inspect.custom && (t.exports.prototype[i.inspect.custom] = function () { var e = i.inspect({ length: this.length }); return this.constructor.name + " " + e; });
|
2049
|
+
}, { "safe-buffer": 118, util: 11 }], 112: [function (e, t, r) {
|
2050
|
+
"use strict";
|
2051
|
+
var n = e("process-nextick-args");
|
2052
|
+
function i(e, t) { e.emit("error", t); }
|
2053
|
+
t.exports = { destroy: function (e, t) { var r = this, o = this._readableState && this._readableState.destroyed, s = this._writableState && this._writableState.destroyed; return o || s ? (t ? t(e) : !e || this._writableState && this._writableState.errorEmitted || n.nextTick(i, this, e), this) : (this._readableState && (this._readableState.destroyed = !0), this._writableState && (this._writableState.destroyed = !0), this._destroy(e || null, function (e) { !t && e ? (n.nextTick(i, r, e), r._writableState && (r._writableState.errorEmitted = !0)) : t && t(e); }), this); }, undestroy: function () { this._readableState && (this._readableState.destroyed = !1, this._readableState.reading = !1, this._readableState.ended = !1, this._readableState.endEmitted = !1), this._writableState && (this._writableState.destroyed = !1, this._writableState.ended = !1, this._writableState.ending = !1, this._writableState.finished = !1, this._writableState.errorEmitted = !1); } };
|
2054
|
+
}, { "process-nextick-args": 99 }], 113: [function (e, t, r) { t.exports = e("events").EventEmitter; }, { events: 83 }], 114: [function (e, t, r) { var n = {}.toString; t.exports = Array.isArray || function (e) { return "[object Array]" == n.call(e); }; }, {}], 115: [function (e, t, r) {
|
2055
|
+
"use strict";
|
2056
|
+
var n = e("safe-buffer").Buffer, i = n.isEncoding || function (e) { switch ((e = "" + e) && e.toLowerCase()) {
|
2057
|
+
case "hex":
|
2058
|
+
case "utf8":
|
2059
|
+
case "utf-8":
|
2060
|
+
case "ascii":
|
2061
|
+
case "binary":
|
2062
|
+
case "base64":
|
2063
|
+
case "ucs2":
|
2064
|
+
case "ucs-2":
|
2065
|
+
case "utf16le":
|
2066
|
+
case "utf-16le":
|
2067
|
+
case "raw": return !0;
|
2068
|
+
default: return !1;
|
2069
|
+
} };
|
2070
|
+
function o(e) { var t; switch ((this.encoding = function (e) { var t = function (e) { if (!e)
|
2071
|
+
return "utf8"; for (var t;;)
|
2072
|
+
switch (e) {
|
2073
|
+
case "utf8":
|
2074
|
+
case "utf-8": return "utf8";
|
2075
|
+
case "ucs2":
|
2076
|
+
case "ucs-2":
|
2077
|
+
case "utf16le":
|
2078
|
+
case "utf-16le": return "utf16le";
|
2079
|
+
case "latin1":
|
2080
|
+
case "binary": return "latin1";
|
2081
|
+
case "base64":
|
2082
|
+
case "ascii":
|
2083
|
+
case "hex": return e;
|
2084
|
+
default:
|
2085
|
+
if (t)
|
2086
|
+
return;
|
2087
|
+
e = ("" + e).toLowerCase(), t = !0;
|
2088
|
+
} }(e); if ("string" != typeof t && (n.isEncoding === i || !i(e)))
|
2089
|
+
throw new Error("Unknown encoding: " + e); return t || e; }(e), this.encoding)) {
|
2090
|
+
case "utf16le":
|
2091
|
+
this.text = u, this.end = c, t = 4;
|
2092
|
+
break;
|
2093
|
+
case "utf8":
|
2094
|
+
this.fillLast = a, t = 4;
|
2095
|
+
break;
|
2096
|
+
case "base64":
|
2097
|
+
this.text = l, this.end = f, t = 3;
|
2098
|
+
break;
|
2099
|
+
default: return this.write = p, void (this.end = h);
|
2100
|
+
} this.lastNeed = 0, this.lastTotal = 0, this.lastChar = n.allocUnsafe(t); }
|
2101
|
+
function s(e) { return e <= 127 ? 0 : e >> 5 == 6 ? 2 : e >> 4 == 14 ? 3 : e >> 3 == 30 ? 4 : e >> 6 == 2 ? -1 : -2; }
|
2102
|
+
function a(e) { var t = this.lastTotal - this.lastNeed, r = function (e, t, r) { if (128 != (192 & t[0]))
|
2103
|
+
return e.lastNeed = 0, "�"; if (e.lastNeed > 1 && t.length > 1) {
|
2104
|
+
if (128 != (192 & t[1]))
|
2105
|
+
return e.lastNeed = 1, "�";
|
2106
|
+
if (e.lastNeed > 2 && t.length > 2 && 128 != (192 & t[2]))
|
2107
|
+
return e.lastNeed = 2, "�";
|
2108
|
+
} }(this, e); return void 0 !== r ? r : this.lastNeed <= e.length ? (e.copy(this.lastChar, t, 0, this.lastNeed), this.lastChar.toString(this.encoding, 0, this.lastTotal)) : (e.copy(this.lastChar, t, 0, e.length), void (this.lastNeed -= e.length)); }
|
2109
|
+
function u(e, t) { if ((e.length - t) % 2 == 0) {
|
2110
|
+
var r = e.toString("utf16le", t);
|
2111
|
+
if (r) {
|
2112
|
+
var n = r.charCodeAt(r.length - 1);
|
2113
|
+
if (n >= 55296 && n <= 56319)
|
2114
|
+
return this.lastNeed = 2, this.lastTotal = 4, this.lastChar[0] = e[e.length - 2], this.lastChar[1] = e[e.length - 1], r.slice(0, -1);
|
2115
|
+
}
|
2116
|
+
return r;
|
2117
|
+
} return this.lastNeed = 1, this.lastTotal = 2, this.lastChar[0] = e[e.length - 1], e.toString("utf16le", t, e.length - 1); }
|
2118
|
+
function c(e) { var t = e && e.length ? this.write(e) : ""; if (this.lastNeed) {
|
2119
|
+
var r = this.lastTotal - this.lastNeed;
|
2120
|
+
return t + this.lastChar.toString("utf16le", 0, r);
|
2121
|
+
} return t; }
|
2122
|
+
function l(e, t) { var r = (e.length - t) % 3; return 0 === r ? e.toString("base64", t) : (this.lastNeed = 3 - r, this.lastTotal = 3, 1 === r ? this.lastChar[0] = e[e.length - 1] : (this.lastChar[0] = e[e.length - 2], this.lastChar[1] = e[e.length - 1]), e.toString("base64", t, e.length - r)); }
|
2123
|
+
function f(e) { var t = e && e.length ? this.write(e) : ""; return this.lastNeed ? t + this.lastChar.toString("base64", 0, 3 - this.lastNeed) : t; }
|
2124
|
+
function p(e) { return e.toString(this.encoding); }
|
2125
|
+
function h(e) { return e && e.length ? this.write(e) : ""; }
|
2126
|
+
r.StringDecoder = o, o.prototype.write = function (e) { if (0 === e.length)
|
2127
|
+
return ""; var t, r; if (this.lastNeed) {
|
2128
|
+
if (void 0 === (t = this.fillLast(e)))
|
2129
|
+
return "";
|
2130
|
+
r = this.lastNeed, this.lastNeed = 0;
|
2131
|
+
}
|
2132
|
+
else
|
2133
|
+
r = 0; return r < e.length ? t ? t + this.text(e, r) : this.text(e, r) : t || ""; }, o.prototype.end = function (e) { var t = e && e.length ? this.write(e) : ""; return this.lastNeed ? t + "�" : t; }, o.prototype.text = function (e, t) { var r = function (e, t, r) { var n = t.length - 1; if (n < r)
|
2134
|
+
return 0; var i = s(t[n]); if (i >= 0)
|
2135
|
+
return i > 0 && (e.lastNeed = i - 1), i; if (--n < r || -2 === i)
|
2136
|
+
return 0; if ((i = s(t[n])) >= 0)
|
2137
|
+
return i > 0 && (e.lastNeed = i - 2), i; if (--n < r || -2 === i)
|
2138
|
+
return 0; if ((i = s(t[n])) >= 0)
|
2139
|
+
return i > 0 && (2 === i ? i = 0 : e.lastNeed = i - 3), i; return 0; }(this, e, t); if (!this.lastNeed)
|
2140
|
+
return e.toString("utf8", t); this.lastTotal = r; var n = e.length - (r - this.lastNeed); return e.copy(this.lastChar, 0, n), e.toString("utf8", t, n); }, o.prototype.fillLast = function (e) { if (this.lastNeed <= e.length)
|
2141
|
+
return e.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed), this.lastChar.toString(this.encoding, 0, this.lastTotal); e.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, e.length), this.lastNeed -= e.length; };
|
2142
|
+
}, { "safe-buffer": 118 }], 116: [function (e, t, r) { (r = t.exports = e("./lib/_stream_readable.js")).Stream = r, r.Readable = r, r.Writable = e("./lib/_stream_writable.js"), r.Duplex = e("./lib/_stream_duplex.js"), r.Transform = e("./lib/_stream_transform.js"), r.PassThrough = e("./lib/_stream_passthrough.js"); }, { "./lib/_stream_duplex.js": 106, "./lib/_stream_passthrough.js": 107, "./lib/_stream_readable.js": 108, "./lib/_stream_transform.js": 109, "./lib/_stream_writable.js": 110 }], 117: [function (e, t, r) {
|
2143
|
+
"use strict";
|
2144
|
+
t.exports = function () { if ("function" != typeof arguments[0])
|
2145
|
+
throw new Error("callback needed"); if ("number" != typeof arguments[1])
|
2146
|
+
throw new Error("interval needed"); var e; if (arguments.length > 0) {
|
2147
|
+
e = new Array(arguments.length - 2);
|
2148
|
+
for (var t = 0; t < e.length; t++)
|
2149
|
+
e[t] = arguments[t + 2];
|
2150
|
+
} return new function (e, t, r) { var n = this; this._callback = e, this._args = r, this._interval = setInterval(e, t, this._args), this.reschedule = function (e) { e || (e = n._interval), n._interval && clearInterval(n._interval), n._interval = setInterval(n._callback, e, n._args); }, this.clear = function () { n._interval && (clearInterval(n._interval), n._interval = void 0); }, this.destroy = function () { n._interval && clearInterval(n._interval), n._callback = void 0, n._interval = void 0, n._args = void 0; }; }(arguments[0], arguments[1], e); };
|
2151
|
+
}, {}], 118: [function (e, t, r) { var n = e("buffer"), i = n.Buffer; function o(e, t) { for (var r in e)
|
2152
|
+
t[r] = e[r]; } function s(e, t, r) { return i(e, t, r); } i.from && i.alloc && i.allocUnsafe && i.allocUnsafeSlow ? t.exports = n : (o(n, r), r.Buffer = s), o(i, s), s.from = function (e, t, r) { if ("number" == typeof e)
|
2153
|
+
throw new TypeError("Argument must not be a number"); return i(e, t, r); }, s.alloc = function (e, t, r) { if ("number" != typeof e)
|
2154
|
+
throw new TypeError("Argument must be a number"); var n = i(e); return void 0 !== t ? "string" == typeof r ? n.fill(t, r) : n.fill(t) : n.fill(0), n; }, s.allocUnsafe = function (e) { if ("number" != typeof e)
|
2155
|
+
throw new TypeError("Argument must be a number"); return i(e); }, s.allocUnsafeSlow = function (e) { if ("number" != typeof e)
|
2156
|
+
throw new TypeError("Argument must be a number"); return n.SlowBuffer(e); }; }, { buffer: 12 }], 119: [function (e, t, r) { t.exports = function (e) { var t = e._readableState; return t ? t.objectMode || "number" == typeof e._duplexState ? e.read() : e.read((r = t, r.buffer.length ? r.buffer.head ? r.buffer.head.data.length : r.buffer[0].length : r.length)) : null; var r; }; }, {}], 120: [function (e, t, r) { (function (t, n) { var i = e("process/browser.js").nextTick, o = Function.prototype.apply, s = Array.prototype.slice, a = {}, u = 0; function c(e, t) { this._id = e, this._clearFn = t; } r.setTimeout = function () { return new c(o.call(setTimeout, window, arguments), clearTimeout); }, r.setInterval = function () { return new c(o.call(setInterval, window, arguments), clearInterval); }, r.clearTimeout = r.clearInterval = function (e) { e.close(); }, c.prototype.unref = c.prototype.ref = function () { }, c.prototype.close = function () { this._clearFn.call(window, this._id); }, r.enroll = function (e, t) { clearTimeout(e._idleTimeoutId), e._idleTimeout = t; }, r.unenroll = function (e) { clearTimeout(e._idleTimeoutId), e._idleTimeout = -1; }, r._unrefActive = r.active = function (e) { clearTimeout(e._idleTimeoutId); var t = e._idleTimeout; t >= 0 && (e._idleTimeoutId = setTimeout(function () { e._onTimeout && e._onTimeout(); }, t)); }, r.setImmediate = "function" == typeof t ? t : function (e) { var t = u++, n = !(arguments.length < 2) && s.call(arguments, 1); return a[t] = !0, i(function () { a[t] && (n ? e.apply(null, n) : e.call(null), r.clearImmediate(t)); }), t; }, r.clearImmediate = "function" == typeof n ? n : function (e) { delete a[e]; }; }).call(this, e("timers").setImmediate, e("timers").clearImmediate); }, { "process/browser.js": 100, timers: 120 }], 121: [function (e, t, r) {
|
2157
|
+
"use strict";
|
2158
|
+
var n = e("../prototype/is");
|
2159
|
+
t.exports = function (e) { if ("function" != typeof e)
|
2160
|
+
return !1; if (!hasOwnProperty.call(e, "length"))
|
2161
|
+
return !1; try {
|
2162
|
+
if ("number" != typeof e.length)
|
2163
|
+
return !1;
|
2164
|
+
if ("function" != typeof e.call)
|
2165
|
+
return !1;
|
2166
|
+
if ("function" != typeof e.apply)
|
2167
|
+
return !1;
|
2168
|
+
}
|
2169
|
+
catch (e) {
|
2170
|
+
return !1;
|
2171
|
+
} return !n(e); };
|
2172
|
+
}, { "../prototype/is": 128 }], 122: [function (e, t, r) {
|
2173
|
+
"use strict";
|
2174
|
+
var n = e("../value/is"), i = e("../object/is"), o = e("../string/coerce"), s = e("./to-short-string"), a = function (e, t) { return e.replace("%v", s(t)); };
|
2175
|
+
t.exports = function (e, t, r) { if (!i(r))
|
2176
|
+
throw new TypeError(a(t, e)); if (!n(e)) {
|
2177
|
+
if ("default" in r)
|
2178
|
+
return r.default;
|
2179
|
+
if (r.isOptional)
|
2180
|
+
return null;
|
2181
|
+
} var s = o(r.errorMessage); throw n(s) || (s = t), new TypeError(a(s, e)); };
|
2182
|
+
}, { "../object/is": 125, "../string/coerce": 129, "../value/is": 131, "./to-short-string": 124 }], 123: [function (e, t, r) {
|
2183
|
+
"use strict";
|
2184
|
+
t.exports = function (e) { try {
|
2185
|
+
return e.toString();
|
2186
|
+
}
|
2187
|
+
catch (t) {
|
2188
|
+
try {
|
2189
|
+
return String(e);
|
2190
|
+
}
|
2191
|
+
catch (e) {
|
2192
|
+
return null;
|
2193
|
+
}
|
2194
|
+
} };
|
2195
|
+
}, {}], 124: [function (e, t, r) {
|
2196
|
+
"use strict";
|
2197
|
+
var n = e("./safe-to-string"), i = /[\n\r\u2028\u2029]/g;
|
2198
|
+
t.exports = function (e) { var t = n(e); return null === t ? "<Non-coercible to string value>" : (t.length > 100 && (t = t.slice(0, 99) + "…"), t = t.replace(i, function (e) { switch (e) {
|
2199
|
+
case "\n": return "\\n";
|
2200
|
+
case "\r": return "\\r";
|
2201
|
+
case "\u2028": return "\\u2028";
|
2202
|
+
case "\u2029": return "\\u2029";
|
2203
|
+
default: throw new Error("Unexpected character");
|
2204
|
+
} })); };
|
2205
|
+
}, { "./safe-to-string": 123 }], 125: [function (e, t, r) {
|
2206
|
+
"use strict";
|
2207
|
+
var n = e("../value/is"), i = { object: !0, function: !0, undefined: !0 };
|
2208
|
+
t.exports = function (e) { return !!n(e) && hasOwnProperty.call(i, typeof e); };
|
2209
|
+
}, { "../value/is": 131 }], 126: [function (e, t, r) {
|
2210
|
+
"use strict";
|
2211
|
+
var n = e("../lib/resolve-exception"), i = e("./is");
|
2212
|
+
t.exports = function (e) { return i(e) ? e : n(e, "%v is not a plain function", arguments[1]); };
|
2213
|
+
}, { "../lib/resolve-exception": 122, "./is": 127 }], 127: [function (e, t, r) {
|
2214
|
+
"use strict";
|
2215
|
+
var n = e("../function/is"), i = /^\s*class[\s{/}]/, o = Function.prototype.toString;
|
2216
|
+
t.exports = function (e) { return !!n(e) && !i.test(o.call(e)); };
|
2217
|
+
}, { "../function/is": 121 }], 128: [function (e, t, r) {
|
2218
|
+
"use strict";
|
2219
|
+
var n = e("../object/is");
|
2220
|
+
t.exports = function (e) { if (!n(e))
|
2221
|
+
return !1; try {
|
2222
|
+
return !!e.constructor && e.constructor.prototype === e;
|
2223
|
+
}
|
2224
|
+
catch (e) {
|
2225
|
+
return !1;
|
2226
|
+
} };
|
2227
|
+
}, { "../object/is": 125 }], 129: [function (e, t, r) {
|
2228
|
+
"use strict";
|
2229
|
+
var n = e("../value/is"), i = e("../object/is"), o = Object.prototype.toString;
|
2230
|
+
t.exports = function (e) { if (!n(e))
|
2231
|
+
return null; if (i(e)) {
|
2232
|
+
var t = e.toString;
|
2233
|
+
if ("function" != typeof t)
|
2234
|
+
return null;
|
2235
|
+
if (t === o)
|
2236
|
+
return null;
|
2237
|
+
} try {
|
2238
|
+
return "" + e;
|
2239
|
+
}
|
2240
|
+
catch (e) {
|
2241
|
+
return null;
|
2242
|
+
} };
|
2243
|
+
}, { "../object/is": 125, "../value/is": 131 }], 130: [function (e, t, r) {
|
2244
|
+
"use strict";
|
2245
|
+
var n = e("../lib/resolve-exception"), i = e("./is");
|
2246
|
+
t.exports = function (e) { return i(e) ? e : n(e, "Cannot use %v", arguments[1]); };
|
2247
|
+
}, { "../lib/resolve-exception": 122, "./is": 131 }], 131: [function (e, t, r) {
|
2248
|
+
"use strict";
|
2249
|
+
t.exports = function (e) { return void 0 !== e && null !== e; };
|
2250
|
+
}, {}], 132: [function (e, t, r) {
|
2251
|
+
"use strict";
|
2252
|
+
var n = e("punycode"), i = e("./util");
|
2253
|
+
function o() { this.protocol = null, this.slashes = null, this.auth = null, this.host = null, this.port = null, this.hostname = null, this.hash = null, this.search = null, this.query = null, this.pathname = null, this.path = null, this.href = null; }
|
2254
|
+
r.parse = _, r.resolve = function (e, t) { return _(e, !1, !0).resolve(t); }, r.resolveObject = function (e, t) { return e ? _(e, !1, !0).resolveObject(t) : t; }, r.format = function (e) { i.isString(e) && (e = _(e)); return e instanceof o ? e.format() : o.prototype.format.call(e); }, r.Url = o;
|
2255
|
+
var s = /^([a-z0-9.+-]+:)/i, a = /:[0-9]*$/, u = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/, c = ["{", "}", "|", "\\", "^", "`"].concat(["<", ">", '"', "`", " ", "\r", "\n", "\t"]), l = ["'"].concat(c), f = ["%", "/", "?", ";", "#"].concat(l), p = ["/", "?", "#"], h = /^[+a-z0-9A-Z_-]{0,63}$/, d = /^([+a-z0-9A-Z_-]{0,63})(.*)$/, g = { javascript: !0, "javascript:": !0 }, b = { javascript: !0, "javascript:": !0 }, y = { http: !0, https: !0, ftp: !0, gopher: !0, file: !0, "http:": !0, "https:": !0, "ftp:": !0, "gopher:": !0, "file:": !0 }, m = e("querystring");
|
2256
|
+
function _(e, t, r) { if (e && i.isObject(e) && e instanceof o)
|
2257
|
+
return e; var n = new o; return n.parse(e, t, r), n; }
|
2258
|
+
o.prototype.parse = function (e, t, r) { if (!i.isString(e))
|
2259
|
+
throw new TypeError("Parameter 'url' must be a string, not " + typeof e); var o = e.indexOf("?"), a = -1 !== o && o < e.indexOf("#") ? "?" : "#", c = e.split(a); c[0] = c[0].replace(/\\/g, "/"); var _ = e = c.join(a); if (_ = _.trim(), !r && 1 === e.split("#").length) {
|
2260
|
+
var v = u.exec(_);
|
2261
|
+
if (v)
|
2262
|
+
return this.path = _, this.href = _, this.pathname = v[1], v[2] ? (this.search = v[2], this.query = t ? m.parse(this.search.substr(1)) : this.search.substr(1)) : t && (this.search = "", this.query = {}), this;
|
2263
|
+
} var w = s.exec(_); if (w) {
|
2264
|
+
var S = (w = w[0]).toLowerCase();
|
2265
|
+
this.protocol = S, _ = _.substr(w.length);
|
2266
|
+
} if (r || w || _.match(/^\/\/[^@\/]+@[^@\/]+/)) {
|
2267
|
+
var x = "//" === _.substr(0, 2);
|
2268
|
+
!x || w && b[w] || (_ = _.substr(2), this.slashes = !0);
|
2269
|
+
} if (!b[w] && (x || w && !y[w])) {
|
2270
|
+
for (var k, E, I = -1, C = 0; C < p.length; C++) {
|
2271
|
+
-1 !== (O = _.indexOf(p[C])) && (-1 === I || O < I) && (I = O);
|
2272
|
+
}
|
2273
|
+
-1 !== (E = -1 === I ? _.lastIndexOf("@") : _.lastIndexOf("@", I)) && (k = _.slice(0, E), _ = _.slice(E + 1), this.auth = decodeURIComponent(k)), I = -1;
|
2274
|
+
for (C = 0; C < f.length; C++) {
|
2275
|
+
var O;
|
2276
|
+
-1 !== (O = _.indexOf(f[C])) && (-1 === I || O < I) && (I = O);
|
2277
|
+
}
|
2278
|
+
-1 === I && (I = _.length), this.host = _.slice(0, I), _ = _.slice(I), this.parseHost(), this.hostname = this.hostname || "";
|
2279
|
+
var j = "[" === this.hostname[0] && "]" === this.hostname[this.hostname.length - 1];
|
2280
|
+
if (!j)
|
2281
|
+
for (var T = this.hostname.split(/\./), A = (C = 0, T.length); C < A; C++) {
|
2282
|
+
var P = T[C];
|
2283
|
+
if (P && !P.match(h)) {
|
2284
|
+
for (var M = "", B = 0, R = P.length; B < R; B++)
|
2285
|
+
P.charCodeAt(B) > 127 ? M += "x" : M += P[B];
|
2286
|
+
if (!M.match(h)) {
|
2287
|
+
var U = T.slice(0, C), N = T.slice(C + 1), L = P.match(d);
|
2288
|
+
L && (U.push(L[1]), N.unshift(L[2])), N.length && (_ = "/" + N.join(".") + _), this.hostname = U.join(".");
|
2289
|
+
break;
|
2290
|
+
}
|
2291
|
+
}
|
2292
|
+
}
|
2293
|
+
this.hostname.length > 255 ? this.hostname = "" : this.hostname = this.hostname.toLowerCase(), j || (this.hostname = n.toASCII(this.hostname));
|
2294
|
+
var q = this.port ? ":" + this.port : "", F = this.hostname || "";
|
2295
|
+
this.host = F + q, this.href += this.host, j && (this.hostname = this.hostname.substr(1, this.hostname.length - 2), "/" !== _[0] && (_ = "/" + _));
|
2296
|
+
} if (!g[S])
|
2297
|
+
for (C = 0, A = l.length; C < A; C++) {
|
2298
|
+
var D = l[C];
|
2299
|
+
if (-1 !== _.indexOf(D)) {
|
2300
|
+
var z = encodeURIComponent(D);
|
2301
|
+
z === D && (z = escape(D)), _ = _.split(D).join(z);
|
2302
|
+
}
|
2303
|
+
} var W = _.indexOf("#"); -1 !== W && (this.hash = _.substr(W), _ = _.slice(0, W)); var K = _.indexOf("?"); if (-1 !== K ? (this.search = _.substr(K), this.query = _.substr(K + 1), t && (this.query = m.parse(this.query)), _ = _.slice(0, K)) : t && (this.search = "", this.query = {}), _ && (this.pathname = _), y[S] && this.hostname && !this.pathname && (this.pathname = "/"), this.pathname || this.search) {
|
2304
|
+
q = this.pathname || "";
|
2305
|
+
var H = this.search || "";
|
2306
|
+
this.path = q + H;
|
2307
|
+
} return this.href = this.format(), this; }, o.prototype.format = function () { var e = this.auth || ""; e && (e = (e = encodeURIComponent(e)).replace(/%3A/i, ":"), e += "@"); var t = this.protocol || "", r = this.pathname || "", n = this.hash || "", o = !1, s = ""; this.host ? o = e + this.host : this.hostname && (o = e + (-1 === this.hostname.indexOf(":") ? this.hostname : "[" + this.hostname + "]"), this.port && (o += ":" + this.port)), this.query && i.isObject(this.query) && Object.keys(this.query).length && (s = m.stringify(this.query)); var a = this.search || s && "?" + s || ""; return t && ":" !== t.substr(-1) && (t += ":"), this.slashes || (!t || y[t]) && !1 !== o ? (o = "//" + (o || ""), r && "/" !== r.charAt(0) && (r = "/" + r)) : o || (o = ""), n && "#" !== n.charAt(0) && (n = "#" + n), a && "?" !== a.charAt(0) && (a = "?" + a), t + o + (r = r.replace(/[?#]/g, function (e) { return encodeURIComponent(e); })) + (a = a.replace("#", "%23")) + n; }, o.prototype.resolve = function (e) { return this.resolveObject(_(e, !1, !0)).format(); }, o.prototype.resolveObject = function (e) { if (i.isString(e)) {
|
2308
|
+
var t = new o;
|
2309
|
+
t.parse(e, !1, !0), e = t;
|
2310
|
+
} for (var r = new o, n = Object.keys(this), s = 0; s < n.length; s++) {
|
2311
|
+
var a = n[s];
|
2312
|
+
r[a] = this[a];
|
2313
|
+
} if (r.hash = e.hash, "" === e.href)
|
2314
|
+
return r.href = r.format(), r; if (e.slashes && !e.protocol) {
|
2315
|
+
for (var u = Object.keys(e), c = 0; c < u.length; c++) {
|
2316
|
+
var l = u[c];
|
2317
|
+
"protocol" !== l && (r[l] = e[l]);
|
2318
|
+
}
|
2319
|
+
return y[r.protocol] && r.hostname && !r.pathname && (r.path = r.pathname = "/"), r.href = r.format(), r;
|
2320
|
+
} if (e.protocol && e.protocol !== r.protocol) {
|
2321
|
+
if (!y[e.protocol]) {
|
2322
|
+
for (var f = Object.keys(e), p = 0; p < f.length; p++) {
|
2323
|
+
var h = f[p];
|
2324
|
+
r[h] = e[h];
|
2325
|
+
}
|
2326
|
+
return r.href = r.format(), r;
|
2327
|
+
}
|
2328
|
+
if (r.protocol = e.protocol, e.host || b[e.protocol])
|
2329
|
+
r.pathname = e.pathname;
|
2330
|
+
else {
|
2331
|
+
for (var d = (e.pathname || "").split("/"); d.length && !(e.host = d.shift());)
|
2332
|
+
;
|
2333
|
+
e.host || (e.host = ""), e.hostname || (e.hostname = ""), "" !== d[0] && d.unshift(""), d.length < 2 && d.unshift(""), r.pathname = d.join("/");
|
2334
|
+
}
|
2335
|
+
if (r.search = e.search, r.query = e.query, r.host = e.host || "", r.auth = e.auth, r.hostname = e.hostname || e.host, r.port = e.port, r.pathname || r.search) {
|
2336
|
+
var g = r.pathname || "", m = r.search || "";
|
2337
|
+
r.path = g + m;
|
2338
|
+
}
|
2339
|
+
return r.slashes = r.slashes || e.slashes, r.href = r.format(), r;
|
2340
|
+
} var _ = r.pathname && "/" === r.pathname.charAt(0), v = e.host || e.pathname && "/" === e.pathname.charAt(0), w = v || _ || r.host && e.pathname, S = w, x = r.pathname && r.pathname.split("/") || [], k = (d = e.pathname && e.pathname.split("/") || [], r.protocol && !y[r.protocol]); if (k && (r.hostname = "", r.port = null, r.host && ("" === x[0] ? x[0] = r.host : x.unshift(r.host)), r.host = "", e.protocol && (e.hostname = null, e.port = null, e.host && ("" === d[0] ? d[0] = e.host : d.unshift(e.host)), e.host = null), w = w && ("" === d[0] || "" === x[0])), v)
|
2341
|
+
r.host = e.host || "" === e.host ? e.host : r.host, r.hostname = e.hostname || "" === e.hostname ? e.hostname : r.hostname, r.search = e.search, r.query = e.query, x = d;
|
2342
|
+
else if (d.length)
|
2343
|
+
x || (x = []), x.pop(), x = x.concat(d), r.search = e.search, r.query = e.query;
|
2344
|
+
else if (!i.isNullOrUndefined(e.search)) {
|
2345
|
+
if (k)
|
2346
|
+
r.hostname = r.host = x.shift(), (j = !!(r.host && r.host.indexOf("@") > 0) && r.host.split("@")) && (r.auth = j.shift(), r.host = r.hostname = j.shift());
|
2347
|
+
return r.search = e.search, r.query = e.query, i.isNull(r.pathname) && i.isNull(r.search) || (r.path = (r.pathname ? r.pathname : "") + (r.search ? r.search : "")), r.href = r.format(), r;
|
2348
|
+
} if (!x.length)
|
2349
|
+
return r.pathname = null, r.search ? r.path = "/" + r.search : r.path = null, r.href = r.format(), r; for (var E = x.slice(-1)[0], I = (r.host || e.host || x.length > 1) && ("." === E || ".." === E) || "" === E, C = 0, O = x.length; O >= 0; O--)
|
2350
|
+
"." === (E = x[O]) ? x.splice(O, 1) : ".." === E ? (x.splice(O, 1), C++) : C && (x.splice(O, 1), C--); if (!w && !S)
|
2351
|
+
for (; C--; C)
|
2352
|
+
x.unshift(".."); !w || "" === x[0] || x[0] && "/" === x[0].charAt(0) || x.unshift(""), I && "/" !== x.join("/").substr(-1) && x.push(""); var j, T = "" === x[0] || x[0] && "/" === x[0].charAt(0); k && (r.hostname = r.host = T ? "" : x.length ? x.shift() : "", (j = !!(r.host && r.host.indexOf("@") > 0) && r.host.split("@")) && (r.auth = j.shift(), r.host = r.hostname = j.shift())); return (w = w || r.host && x.length) && !T && x.unshift(""), x.length ? r.pathname = x.join("/") : (r.pathname = null, r.path = null), i.isNull(r.pathname) && i.isNull(r.search) || (r.path = (r.pathname ? r.pathname : "") + (r.search ? r.search : "")), r.auth = e.auth || r.auth, r.slashes = r.slashes || e.slashes, r.href = r.format(), r; }, o.prototype.parseHost = function () { var e = this.host, t = a.exec(e); t && (":" !== (t = t[0]) && (this.port = t.substr(1)), e = e.substr(0, e.length - t.length)), e && (this.hostname = e); };
|
2353
|
+
}, { "./util": 133, punycode: 101, querystring: 104 }], 133: [function (e, t, r) {
|
2354
|
+
"use strict";
|
2355
|
+
t.exports = { isString: function (e) { return "string" == typeof e; }, isObject: function (e) { return "object" == typeof e && null !== e; }, isNull: function (e) { return null === e; }, isNullOrUndefined: function (e) { return null == e; } };
|
2356
|
+
}, {}], 134: [function (e, t, r) { (function (e) { function r(t) { try {
|
2357
|
+
if (!e.localStorage)
|
2358
|
+
return !1;
|
2359
|
+
}
|
2360
|
+
catch (e) {
|
2361
|
+
return !1;
|
2362
|
+
} var r = e.localStorage[t]; return null != r && "true" === String(r).toLowerCase(); } t.exports = function (e, t) { if (r("noDeprecation"))
|
2363
|
+
return e; var n = !1; return function () { if (!n) {
|
2364
|
+
if (r("throwDeprecation"))
|
2365
|
+
throw new Error(t);
|
2366
|
+
r("traceDeprecation") ? console.trace(t) : console.warn(t), n = !0;
|
2367
|
+
} return e.apply(this, arguments); }; }; }).call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {}); }, {}], 135: [function (e, t, r) { t.exports = function (e) { return e && "object" == typeof e && "function" == typeof e.copy && "function" == typeof e.fill && "function" == typeof e.readUInt8; }; }, {}], 136: [function (e, t, r) { (function (t, n) { var i = /%[sdj%]/g; r.format = function (e) { if (!y(e)) {
|
2368
|
+
for (var t = [], r = 0; r < arguments.length; r++)
|
2369
|
+
t.push(a(arguments[r]));
|
2370
|
+
return t.join(" ");
|
2371
|
+
} r = 1; for (var n = arguments, o = n.length, s = String(e).replace(i, function (e) { if ("%%" === e)
|
2372
|
+
return "%"; if (r >= o)
|
2373
|
+
return e; switch (e) {
|
2374
|
+
case "%s": return String(n[r++]);
|
2375
|
+
case "%d": return Number(n[r++]);
|
2376
|
+
case "%j": try {
|
2377
|
+
return JSON.stringify(n[r++]);
|
2378
|
+
}
|
2379
|
+
catch (e) {
|
2380
|
+
return "[Circular]";
|
2381
|
+
}
|
2382
|
+
default: return e;
|
2383
|
+
} }), u = n[r]; r < o; u = n[++r])
|
2384
|
+
g(u) || !v(u) ? s += " " + u : s += " " + a(u); return s; }, r.deprecate = function (e, i) { if (m(n.process))
|
2385
|
+
return function () { return r.deprecate(e, i).apply(this, arguments); }; if (!0 === t.noDeprecation)
|
2386
|
+
return e; var o = !1; return function () { if (!o) {
|
2387
|
+
if (t.throwDeprecation)
|
2388
|
+
throw new Error(i);
|
2389
|
+
t.traceDeprecation ? console.trace(i) : console.error(i), o = !0;
|
2390
|
+
} return e.apply(this, arguments); }; }; var o, s = {}; function a(e, t) { var n = { seen: [], stylize: c }; return arguments.length >= 3 && (n.depth = arguments[2]), arguments.length >= 4 && (n.colors = arguments[3]), d(t) ? n.showHidden = t : t && r._extend(n, t), m(n.showHidden) && (n.showHidden = !1), m(n.depth) && (n.depth = 2), m(n.colors) && (n.colors = !1), m(n.customInspect) && (n.customInspect = !0), n.colors && (n.stylize = u), l(n, e, n.depth); } function u(e, t) { var r = a.styles[t]; return r ? "[" + a.colors[r][0] + "m" + e + "[" + a.colors[r][1] + "m" : e; } function c(e, t) { return e; } function l(e, t, n) { if (e.customInspect && t && x(t.inspect) && t.inspect !== r.inspect && (!t.constructor || t.constructor.prototype !== t)) {
|
2391
|
+
var i = t.inspect(n, e);
|
2392
|
+
return y(i) || (i = l(e, i, n)), i;
|
2393
|
+
} var o = function (e, t) { if (m(t))
|
2394
|
+
return e.stylize("undefined", "undefined"); if (y(t)) {
|
2395
|
+
var r = "'" + JSON.stringify(t).replace(/^"|"$/g, "").replace(/'/g, "\\'").replace(/\\"/g, '"') + "'";
|
2396
|
+
return e.stylize(r, "string");
|
2397
|
+
} if (b(t))
|
2398
|
+
return e.stylize("" + t, "number"); if (d(t))
|
2399
|
+
return e.stylize("" + t, "boolean"); if (g(t))
|
2400
|
+
return e.stylize("null", "null"); }(e, t); if (o)
|
2401
|
+
return o; var s = Object.keys(t), a = function (e) { var t = {}; return e.forEach(function (e, r) { t[e] = !0; }), t; }(s); if (e.showHidden && (s = Object.getOwnPropertyNames(t)), S(t) && (s.indexOf("message") >= 0 || s.indexOf("description") >= 0))
|
2402
|
+
return f(t); if (0 === s.length) {
|
2403
|
+
if (x(t)) {
|
2404
|
+
var u = t.name ? ": " + t.name : "";
|
2405
|
+
return e.stylize("[Function" + u + "]", "special");
|
2406
|
+
}
|
2407
|
+
if (_(t))
|
2408
|
+
return e.stylize(RegExp.prototype.toString.call(t), "regexp");
|
2409
|
+
if (w(t))
|
2410
|
+
return e.stylize(Date.prototype.toString.call(t), "date");
|
2411
|
+
if (S(t))
|
2412
|
+
return f(t);
|
2413
|
+
} var c, v = "", k = !1, E = ["{", "}"]; (h(t) && (k = !0, E = ["[", "]"]), x(t)) && (v = " [Function" + (t.name ? ": " + t.name : "") + "]"); return _(t) && (v = " " + RegExp.prototype.toString.call(t)), w(t) && (v = " " + Date.prototype.toUTCString.call(t)), S(t) && (v = " " + f(t)), 0 !== s.length || k && 0 != t.length ? n < 0 ? _(t) ? e.stylize(RegExp.prototype.toString.call(t), "regexp") : e.stylize("[Object]", "special") : (e.seen.push(t), c = k ? function (e, t, r, n, i) { for (var o = [], s = 0, a = t.length; s < a; ++s)
|
2414
|
+
C(t, String(s)) ? o.push(p(e, t, r, n, String(s), !0)) : o.push(""); return i.forEach(function (i) { i.match(/^\d+$/) || o.push(p(e, t, r, n, i, !0)); }), o; }(e, t, n, a, s) : s.map(function (r) { return p(e, t, n, a, r, k); }), e.seen.pop(), function (e, t, r) { if (e.reduce(function (e, t) { return 0, t.indexOf("\n") >= 0 && 0, e + t.replace(/\u001b\[\d\d?m/g, "").length + 1; }, 0) > 60)
|
2415
|
+
return r[0] + ("" === t ? "" : t + "\n ") + " " + e.join(",\n ") + " " + r[1]; return r[0] + t + " " + e.join(", ") + " " + r[1]; }(c, v, E)) : E[0] + v + E[1]; } function f(e) { return "[" + Error.prototype.toString.call(e) + "]"; } function p(e, t, r, n, i, o) { var s, a, u; if ((u = Object.getOwnPropertyDescriptor(t, i) || { value: t[i] }).get ? a = u.set ? e.stylize("[Getter/Setter]", "special") : e.stylize("[Getter]", "special") : u.set && (a = e.stylize("[Setter]", "special")), C(n, i) || (s = "[" + i + "]"), a || (e.seen.indexOf(u.value) < 0 ? (a = g(r) ? l(e, u.value, null) : l(e, u.value, r - 1)).indexOf("\n") > -1 && (a = o ? a.split("\n").map(function (e) { return " " + e; }).join("\n").substr(2) : "\n" + a.split("\n").map(function (e) { return " " + e; }).join("\n")) : a = e.stylize("[Circular]", "special")), m(s)) {
|
2416
|
+
if (o && i.match(/^\d+$/))
|
2417
|
+
return a;
|
2418
|
+
(s = JSON.stringify("" + i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/) ? (s = s.substr(1, s.length - 2), s = e.stylize(s, "name")) : (s = s.replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'"), s = e.stylize(s, "string"));
|
2419
|
+
} return s + ": " + a; } function h(e) { return Array.isArray(e); } function d(e) { return "boolean" == typeof e; } function g(e) { return null === e; } function b(e) { return "number" == typeof e; } function y(e) { return "string" == typeof e; } function m(e) { return void 0 === e; } function _(e) { return v(e) && "[object RegExp]" === k(e); } function v(e) { return "object" == typeof e && null !== e; } function w(e) { return v(e) && "[object Date]" === k(e); } function S(e) { return v(e) && ("[object Error]" === k(e) || e instanceof Error); } function x(e) { return "function" == typeof e; } function k(e) { return Object.prototype.toString.call(e); } function E(e) { return e < 10 ? "0" + e.toString(10) : e.toString(10); } r.debuglog = function (e) { if (m(o) && (o = t.env.NODE_DEBUG || ""), e = e.toUpperCase(), !s[e])
|
2420
|
+
if (new RegExp("\\b" + e + "\\b", "i").test(o)) {
|
2421
|
+
var n = t.pid;
|
2422
|
+
s[e] = function () { var t = r.format.apply(r, arguments); console.error("%s %d: %s", e, n, t); };
|
2423
|
+
}
|
2424
|
+
else
|
2425
|
+
s[e] = function () { }; return s[e]; }, r.inspect = a, a.colors = { bold: [1, 22], italic: [3, 23], underline: [4, 24], inverse: [7, 27], white: [37, 39], grey: [90, 39], black: [30, 39], blue: [34, 39], cyan: [36, 39], green: [32, 39], magenta: [35, 39], red: [31, 39], yellow: [33, 39] }, a.styles = { special: "cyan", number: "yellow", boolean: "yellow", undefined: "grey", null: "bold", string: "green", date: "magenta", regexp: "red" }, r.isArray = h, r.isBoolean = d, r.isNull = g, r.isNullOrUndefined = function (e) { return null == e; }, r.isNumber = b, r.isString = y, r.isSymbol = function (e) { return "symbol" == typeof e; }, r.isUndefined = m, r.isRegExp = _, r.isObject = v, r.isDate = w, r.isError = S, r.isFunction = x, r.isPrimitive = function (e) { return null === e || "boolean" == typeof e || "number" == typeof e || "string" == typeof e || "symbol" == typeof e || void 0 === e; }, r.isBuffer = e("./support/isBuffer"); var I = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]; function C(e, t) { return Object.prototype.hasOwnProperty.call(e, t); } r.log = function () { var e, t; console.log("%s - %s", (e = new Date, t = [E(e.getHours()), E(e.getMinutes()), E(e.getSeconds())].join(":"), [e.getDate(), I[e.getMonth()], t].join(" ")), r.format.apply(r, arguments)); }, r.inherits = e("inherits"), r._extend = function (e, t) { if (!t || !v(t))
|
2426
|
+
return e; for (var r = Object.keys(t), n = r.length; n--;)
|
2427
|
+
e[r[n]] = t[r[n]]; return e; }; }).call(this, e("_process"), "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {}); }, { "./support/isBuffer": 135, _process: 100, inherits: 88 }], 137: [function (e, t, r) { (function (r, n) {
|
2428
|
+
"use strict";
|
2429
|
+
var i = e("readable-stream").Transform, o = e("duplexify"), s = e("ws"), a = e("safe-buffer").Buffer;
|
2430
|
+
t.exports = function (e, t, u) { var c, l, f = "browser" === r.title, p = !!n.WebSocket, h = f ? function e(t, r, n) { if (l.bufferedAmount > g)
|
2431
|
+
return void setTimeout(e, b, t, r, n); y && "string" == typeof t && (t = a.from(t, "utf8")); try {
|
2432
|
+
l.send(t);
|
2433
|
+
}
|
2434
|
+
catch (e) {
|
2435
|
+
return n(e);
|
2436
|
+
} n(); } : function (e, t, r) { if (l.readyState !== l.OPEN)
|
2437
|
+
return void r(); y && "string" == typeof e && (e = a.from(e, "utf8")); l.send(e, r); }; t && !Array.isArray(t) && "object" == typeof t && (u = t, t = null, ("string" == typeof u.protocol || Array.isArray(u.protocol)) && (t = u.protocol)); u || (u = {}); void 0 === u.objectMode && (u.objectMode = !(!0 === u.binary || void 0 === u.binary)); var d = function (e, t, r) { var n = new i({ objectMode: e.objectMode }); return n._write = t, n._flush = r, n; }(u, h, function (e) { l.close(), e(); }); u.objectMode || (d._writev = function (e, t) { for (var r = new Array(e.length), n = 0; n < e.length; n++)
|
2438
|
+
"string" == typeof e[n].chunk ? r[n] = a.from(e[n], "utf8") : r[n] = e[n].chunk; this._write(a.concat(r), "binary", t); }); var g = u.browserBufferSize || 524288, b = u.browserBufferTimeout || 1e3; "object" == typeof e ? l = e : (l = p && f ? new s(e, t) : new s(e, t, u)).binaryType = "arraybuffer"; l.readyState === l.OPEN ? c = d : (c = o.obj(), l.onopen = function () { c.setReadable(d), c.setWritable(d), c.emit("connect"); }); c.socket = l, l.onclose = function () { c.end(), c.destroy(); }, l.onerror = function (e) { c.destroy(e); }, l.onmessage = function (e) { var t = e.data; t = t instanceof ArrayBuffer ? a.from(t) : a.from(t, "utf8"); d.push(t); }, d.on("close", function () { l.close(); }); var y = !u.objectMode; return c; };
|
2439
|
+
}).call(this, e("_process"), "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {}); }, { _process: 100, duplexify: 19, "readable-stream": 116, "safe-buffer": 118, ws: 138 }], 138: [function (e, t, r) { var n = null; "undefined" != typeof WebSocket ? n = WebSocket : "undefined" != typeof MozWebSocket ? n = MozWebSocket : "undefined" != typeof window && (n = window.WebSocket || window.MozWebSocket), t.exports = n; }, {}], 139: [function (e, t, r) { t.exports = function e(t, r) { if (t && r)
|
2440
|
+
return e(t)(r); if ("function" != typeof t)
|
2441
|
+
throw new TypeError("need wrapper function"); Object.keys(t).forEach(function (e) { n[e] = t[e]; }); return n; function n() { for (var e = new Array(arguments.length), r = 0; r < e.length; r++)
|
2442
|
+
e[r] = arguments[r]; var n = t.apply(this, e), i = e[e.length - 1]; return "function" == typeof n && n !== i && Object.keys(i).forEach(function (e) { n[e] = i[e]; }), n; } }; }, {}], 140: [function (e, t, r) { t.exports = function () { for (var e = {}, t = 0; t < arguments.length; t++) {
|
2443
|
+
var r = arguments[t];
|
2444
|
+
for (var i in r)
|
2445
|
+
n.call(r, i) && (e[i] = r[i]);
|
2446
|
+
} return e; }; var n = Object.prototype.hasOwnProperty; }, {}] }, {}, [9])(9); });
|
2447
|
+
//# sourceMappingURL=mqtt.min.js.map
|